From: Philipp Stephani Date: Fri, 22 Dec 2017 00:56:38 +0000 (+0100) Subject: Fix bugs in JSON test X-Git-Tag: emacs-27.0.90~5987 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c5f9d47ba4eec5e6eebcd4e21ebee78d3a3e4ff4;p=emacs.git 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. --- 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 @@ (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))