emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/compat 7e797daa30 13/14: Test json-insert


From: ELPA Syncer
Subject: [elpa] externals/compat 7e797daa30 13/14: Test json-insert
Date: Tue, 3 Jan 2023 10:57:28 -0500 (EST)

branch: externals/compat
commit 7e797daa30329196293d1b69fb40397519db19e5
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@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)))



reply via email to

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