aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorOleg Pykhalov <go.wigust@gmail.com>2017-12-12 01:41:08 +0300
committerOleg Pykhalov <go.wigust@gmail.com>2018-01-15 14:42:55 +0300
commitb0912e9fdbffab15d9a754b2922778cfbd1fac2a (patch)
tree1fba2abcca4e81cc86dc21d6ae009d627518247c /gnu/packages/patches
parent15eef66e5d7e82a467dd7fbf2e72f7d1fcd6c26f (diff)
downloadgnu-guix-b0912e9fdbffab15d9a754b2922778cfbd1fac2a.tar
gnu-guix-b0912e9fdbffab15d9a754b2922778cfbd1fac2a.tar.gz
gnu: Add emacs-json-reformat.
* gnu/packages/patches/emacs-json-reformat-fix-tests.patch: New file. * gnu/local.mk (dist_patch_DATA): Add this. * gnu/packages/emacs.scm (emacs-json-reformat): New variable.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/emacs-json-reformat-fix-tests.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/gnu/packages/patches/emacs-json-reformat-fix-tests.patch b/gnu/packages/patches/emacs-json-reformat-fix-tests.patch
new file mode 100644
index 0000000000..977e50fc68
--- /dev/null
+++ b/gnu/packages/patches/emacs-json-reformat-fix-tests.patch
@@ -0,0 +1,32 @@
+Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
+
+This patch fixes tests for Emacs 25.
+
+Upstream bug URL:
+
+https://github.com/gongo/json-reformat/issues/33
+
+diff --git a/test/json-reformat-test.el b/test/json-reformat-test.el
+index 7de3be1..b4a4dde 100644
+--- a/test/json-reformat-test.el
++++ b/test/json-reformat-test.el
+@@ -58,7 +58,7 @@
+ (ert-deftest json-reformat-test:string-to-string ()
+ (should (string= "\"foobar\"" (json-reformat:string-to-string "foobar")))
+ (should (string= "\"fo\\\"o\\nbar\"" (json-reformat:string-to-string "fo\"o\nbar")))
+- (should (string= "\"\\u2661\"" (json-reformat:string-to-string "\u2661")))
++ (should (string= "\"♡\"" (json-reformat:string-to-string "\u2661")))
+
+ (should (string= "\"^(amq\\\\.gen.*|amq\\\\.default)$\"" (json-reformat:string-to-string "^(amq\\.gen.*|amq\\.default)$")))
+ )
+@@ -148,6 +148,6 @@ bar\"" (json-reformat:string-to-string "fo\"o\nbar")))
+ [{ foo : \"bar\" }, { \"foo\" : \"baz\" }]") ;; At 3 (line)
+ (json-reformat-region (point-min) (point-max)))
+ (should (string=
+- "JSON parse error [Reason] Bad string format: \"doesn't start with '\\\"'!\" [Position] In buffer, line 3 (char 6)"
++ "JSON parse error [Reason] Bad string format: \"doesn't start with \`\\\"'!\" [Position] In buffer, line 3 (char 6)"
+ message-string))
+ )))
+--
+2.15.1
+