branch: externals/compat commit 7e797daa30329196293d1b69fb40397519db19e5 Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
Test json-insert --- compat-tests.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compat-tests.el b/compat-tests.el index 5766d06253..61405d56de 100644 --- a/compat-tests.el +++ b/compat-tests.el @@ -1272,6 +1272,11 @@ being compared against." (should (equal (gethash "key" obj) ["abc" 2])) (should (equal (gethash "yek" obj) :null)))))) +(ert-deftest compat-json-insert () + (with-temp-buffer + (compat--json-insert '((:key . ["abc" 2]) (yek . t))) + (should (equal (buffer-string) "{\":key\":[\"abc\",2],\"yek\":true}")))) + (ert-deftest compat-json-serialize () "Check if `compat--json-serialize' was implemented properly." (let ((input-1 '((:key . ["abc" 2]) (yek . t)))