1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-07 15:21:46 +00:00

Simplify a JSON test

* test/src/json-tests.el (json-serialize/invalid-unicode):
Simplify test.  Hexadecimal escape sequences allow putting
non-Unicode characters in strings directly.
This commit is contained in:
Philipp Stephani 2017-12-22 01:58:39 +01:00
parent c5f9d47ba4
commit 1498ed3705

View File

@ -87,8 +87,7 @@
;; FIXME: "out of memory" is the wrong error signal, but we don't
;; currently distinguish between error types when serializing.
(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 ["u\x110000v"]) :type 'json-out-of-memory)
(should-error (json-serialize ["u\xCCv"]) :type 'json-out-of-memory))
(ert-deftest json-parse-string/null ()