[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/parseclj 496c965edc 074/185: Make t print as true - thanks
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/parseclj 496c965edc 074/185: Make t print as true - thanks @martinklepsch |
Date: |
Tue, 28 Dec 2021 14:05:19 -0500 (EST) |
branch: elpa/parseclj
commit 496c965edc49d622560dc2f7ead464c6ab91bd58
Author: Arne Brasseur <arne@arnebrasseur.net>
Commit: Arne Brasseur <arne@arnebrasseur.net>
Make t print as true - thanks @martinklepsch
---
clj-edn.el | 6 +++---
test/clj-edn-test.el | 6 +++++-
test/clj-parse-test-data.el | 7 ++++++-
3 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/clj-edn.el b/clj-edn.el
index 0a147d31e7..d509c6c4b0 100644
--- a/clj-edn.el
+++ b/clj-edn.el
@@ -118,12 +118,12 @@ handlers as an optional argument to the reader
functions.")
(t (char-to-string char)))))
(insert "\""))
- ((symbolp datum)
- (insert (symbol-name datum)))
-
((eq t datum)
(insert "true"))
+ ((symbolp datum)
+ (insert (symbol-name datum)))
+
((vectorp datum) (insert "[") (clj-edn-print-seq datum) (insert "]"))
((consp datum)
diff --git a/test/clj-edn-test.el b/test/clj-edn-test.el
index 76e8ac54b7..310b1324fa 100644
--- a/test/clj-edn-test.el
+++ b/test/clj-edn-test.el
@@ -36,7 +36,11 @@
(should (equal (clj-edn-print-str nil) "nil"))
(should (equal (clj-edn-print-str 100) "100"))
(should (equal (clj-edn-print-str 1.2) "1.2"))
- (should (equal (clj-edn-print-str [1 2 3]) "[1 2 3]")))
+ (should (equal (clj-edn-print-str [1 2 3]) "[1 2 3]"))
+ (should (equal (clj-edn-print-str t) "true")))
+
+(ert-deftest clj-edn-read-test ()
+ (should (equal (clj-edn-read-str "true") t)))
(defmacro define-clj-edn-read-tests ()
`(progn
diff --git a/test/clj-parse-test-data.el b/test/clj-parse-test-data.el
index 4049514caf..d6f5645d9d 100644
--- a/test/clj-parse-test-data.el
+++ b/test/clj-parse-test-data.el
@@ -288,6 +288,11 @@
(:children . (((:node-type . :number)
(:position . 11)
(:form . "1")
- (:value .
1))))))))))))))
+ (:value . 1))))))))))))
+
+ "booleans"
+ (a-list
+ :source "[nil true false]"
+ :edn '([nil t nil]))))
;;; clj-parse-test-data.el ends here
- [nongnu] elpa/parseclj d4286f9071 010/185: Give README the right extension, (continued)
- [nongnu] elpa/parseclj d4286f9071 010/185: Give README the right extension, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj ce7ad0e427 025/185: implement strings, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj a08b85ffa8 032/185: Implement parsing maps, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 60fd8eb965 053/185: Copy tests from edn.el, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 212e0dc42b 063/185: silly typo, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 96b8180987 087/185: Unparse ASTs that have lexical preservation., ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj da0c877940 069/185: Remove dash, using seq is good enough, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 6ae14f26ce 070/185: Work on tests and EDN printer + other things, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 496a7356bb 064/185: Add edn.el as a dependency, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 87953e44ba 092/185: Parse options on to the reducers, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 496c965edc 074/185: Make t print as true - thanks @martinklepsch,
ELPA Syncer <=
- [nongnu] elpa/parseclj 1cf0fb9d3f 065/185: More build related fixes, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 0644bcdbf4 085/185: Implement :fail-fast, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 6d40b39cec 082/185: Rename clj-edn to parseedn, keep it in this package for now., ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 185ce6367b 090/185: Add :discard support for :lexical-preservation t, and show that it's broken, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 1be462e0f2 108/185: Move parser to its own module, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj f86a3be4bf 107/185: Add last rewordings, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 388bb2bde2 115/185: Fix test case for `\u` and `\o` characters, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj d3cb78544d 106/185: Use Emacs Lisp predicate style convention, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj aeac6a1755 118/185: Fix code's organization for 2-item stack reduction, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj bad1fb8745 119/185: Merge pull request #12 from lambdaisland/nested-2-items-reduction, ELPA Syncer, 2021/12/28