aboutsummaryrefslogtreecommitdiffstats
path: root/test/src/json-tests.el
diff options
context:
space:
mode:
authorPhilipp Stephani2017-12-22 01:56:38 +0100
committerPhilipp Stephani2017-12-22 01:56:38 +0100
commitc5f9d47ba4eec5e6eebcd4e21ebee78d3a3e4ff4 (patch)
tree5543b6ffe786af82fb16ff6932b89ab0bd3f2774 /test/src/json-tests.el
parentb1cf262a79463f28164ea1c2ffee3c657ce02ea4 (diff)
downloademacs-c5f9d47ba4eec5e6eebcd4e21ebee78d3a3e4ff4.tar.gz
emacs-c5f9d47ba4eec5e6eebcd4e21ebee78d3a3e4ff4.zip
Fix bugs in JSON test
* test/src/json-tests.el (json-serialize/invalid-unicode): Fix two bugs that canceled each other out. "a\xCCb" is actually a valid Unicode string because the hexadecimal character escape isn't terminated by the "b". But this was masked by an incorrect closing parentheses, causing an unrelated error.
Diffstat (limited to 'test/src/json-tests.el')
-rw-r--r--test/src/json-tests.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/src/json-tests.el b/test/src/json-tests.el
index 100bf7bd39b..13953beb151 100644
--- a/test/src/json-tests.el
+++ b/test/src/json-tests.el
@@ -89,7 +89,7 @@
89 (should-error (json-serialize ["a\uDBBBb"]) :type 'json-out-of-memory) 89 (should-error (json-serialize ["a\uDBBBb"]) :type 'json-out-of-memory)
90 (should-error (json-serialize (vector (string ?a #x110000 ?b))) 90 (should-error (json-serialize (vector (string ?a #x110000 ?b)))
91 :type 'json-out-of-memory) 91 :type 'json-out-of-memory)
92 (should-error (json-serialize ["a\xCCb"] :type 'json-out-of-memory))) 92 (should-error (json-serialize ["u\xCCv"]) :type 'json-out-of-memory))
93 93
94(ert-deftest json-parse-string/null () 94(ert-deftest json-parse-string/null ()
95 (skip-unless (fboundp 'json-parse-string)) 95 (skip-unless (fboundp 'json-parse-string))