Skip to content

Commit 0ffab01

Browse files
committed
Add test to cover the printing of hash-maps
1 parent adf57f3 commit 0ffab01

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

test/parseedn-test.el

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,19 @@
3737
(should (equal (parseedn-print-str 100) "100"))
3838
(should (equal (parseedn-print-str 1.2) "1.2"))
3939
(should (equal (parseedn-print-str [1 2 3]) "[1 2 3]"))
40-
(should (equal (parseedn-print-str t) "true")))
40+
(should (equal (parseedn-print-str t) "true"))
41+
(should (listp (member (parseedn-print-str
42+
(let ((ht (make-hash-table)))
43+
(puthash :a 1 ht)
44+
(puthash :b 2 ht)
45+
(puthash :c 3 ht)
46+
ht))
47+
'("{:a 1, :b 2, :c 3}"
48+
"{:a 1, :c 3, :b 2}"
49+
"{:b 2, :a 1, :c 3}"
50+
"{:b 2, :c 3, :a 1}"
51+
"{:c 3, :a 1, :b 2}"
52+
"{:c 3, :b 2, :a 1}")))))
4153

4254
(ert-deftest parseedn-read-test ()
4355
(should (equal (parseedn-read-str "true") t)))

0 commit comments

Comments
 (0)