emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master b59429a: Small fix for a JSON unit test.


From: Philipp Stephani
Subject: [Emacs-diffs] master b59429a: Small fix for a JSON unit test.
Date: Tue, 23 Apr 2019 06:00:40 -0400 (EDT)

branch: master
commit b59429a43ebe96b3882b237440ac79ad95e636c8
Author: Philipp Stephani <address@hidden>
Commit: Philipp Stephani <address@hidden>

    Small fix for a JSON unit test.
    
    * test/src/json-tests.el (json-parse-string/null): Make JSON object
    syntactically valid.  This test is supposed to check whether an
    escaped null character causes an error, but without quoting the string
    it would be syntactically invalid in any case.
---
 test/src/json-tests.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/src/json-tests.el b/test/src/json-tests.el
index 542eec1..7d824b5 100644
--- a/test/src/json-tests.el
+++ b/test/src/json-tests.el
@@ -159,7 +159,7 @@
   (skip-unless (fboundp 'json-parse-string))
   (should-error (json-parse-string "\x00") :type 'wrong-type-argument)
   ;; FIXME: Reconsider whether this is the right behavior.
-  (should-error (json-parse-string "[a\\u0000b]") :type 'json-parse-error))
+  (should-error (json-parse-string "[\"a\\u0000b\"]") :type 'json-parse-error))
 
 (ert-deftest json-parse-string/invalid-unicode ()
   "Some examples from



reply via email to

[Prev in Thread] Current Thread [Next in Thread]