From b59429a43ebe96b3882b237440ac79ad95e636c8 Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Tue, 23 Apr 2019 11:59:29 +0200 Subject: [PATCH] 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 542eec11bf3..7d824b5c953 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 -- 2.39.2