]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bugs in JSON test
authorPhilipp Stephani <phst@google.com>
Fri, 22 Dec 2017 00:56:38 +0000 (01:56 +0100)
committerPhilipp Stephani <phst@google.com>
Fri, 22 Dec 2017 00:56:38 +0000 (01:56 +0100)
* 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.

test/src/json-tests.el

index 100bf7bd39bea87881ecbfe2bf597d7198f0b467..13953beb1519008adcb70b54747b0a999ed61e4b 100644 (file)
@@ -89,7 +89,7 @@
   (should-error (json-serialize ["a\uDBBBb"]) :type 'json-out-of-memory)
   (should-error (json-serialize (vector (string ?a #x110000 ?b)))
                 :type 'json-out-of-memory)
-  (should-error (json-serialize ["a\xCCb"] :type 'json-out-of-memory)))
+  (should-error (json-serialize ["u\xCCv"]) :type 'json-out-of-memory))
 
 (ert-deftest json-parse-string/null ()
   (skip-unless (fboundp 'json-parse-string))