diff options
Diffstat (limited to 'test/lisp/json-tests.el')
-rw-r--r-- | test/lisp/json-tests.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/lisp/json-tests.el b/test/lisp/json-tests.el index c6bd295d667..1d13ccf074f 100644 --- a/test/lisp/json-tests.el +++ b/test/lisp/json-tests.el @@ -75,7 +75,7 @@ Point is moved to beginning of the buffer." (ert-deftest test-json-peek () (json-tests--with-temp-buffer "" - (should (eq (json-peek) :json-eof))) + (should (zerop (json-peek)))) (json-tests--with-temp-buffer "{ \"a\": 1 }" (should (equal (json-peek) ?{)))) @@ -164,6 +164,8 @@ Point is moved to beginning of the buffer." (should (equal (json-read-escaped-char) ?\")))) (ert-deftest test-json-read-string () + (json-tests--with-temp-buffer "\"formfeed\f\"" + (should-error (json-read-string) :type 'json-string-format)) (json-tests--with-temp-buffer "\"foo \\\"bar\\\"\"" (should (equal (json-read-string) "foo \"bar\""))) (json-tests--with-temp-buffer "\"abcαβγ\"" |