From 270beed0505ef47159d94fb162ff4840958f3ce5 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Tue, 19 Jan 2021 16:46:00 +0000 Subject: fix: Fennel 0.8.0 enhancements Changelog: - fixed bug in try - reworked pretty printing for sets - handle cycles in sets - use new fennel.view format - reorganized library to make requiring it easier --- tests/fn.fnl | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'tests/fn.fnl') diff --git a/tests/fn.fnl b/tests/fn.fnl index 4381a60..63a5802 100644 --- a/tests/fn.fnl +++ b/tests/fn.fnl @@ -1,5 +1,5 @@ (require-macros :tests.test) -(require-macros :cljlib-macros) +(require-macros :macros) (deftest fn* (testing "fn* meta" @@ -7,7 +7,12 @@ "docstring" [x] x) (assert-eq (meta f) (when-meta {:fnl/docstring "docstring" - :fnl/arglist ["[x]"]})) + :fnl/arglist ["([x])"]})) + (fn* f + "docstring" + []) + (assert-eq (meta f) (when-meta {:fnl/docstring "docstring" + :fnl/arglist ["([])"]})) (fn* f "docstring" @@ -20,8 +25,16 @@ ([x] x) ([x y] (+ x y))) (assert-eq (meta f) (when-meta {:fnl/docstring "docstring" - :fnl/arglist ["\n ([x])" - "\n ([x y])"]})) + :fnl/arglist ["([x])" + "([x y])"]})) + + (fn* f + "docstring" + ([]) + ([x y] (+ x y))) + (assert-eq (meta f) (when-meta {:fnl/docstring "docstring" + :fnl/arglist ["([])" + "([x y])"]})) (fn* f "docstring" @@ -29,6 +42,6 @@ ([x y] (+ x y)) ([x y & z] (+ x y))) (assert-eq (meta f) (when-meta {:fnl/docstring "docstring" - :fnl/arglist ["\n ([x])" - "\n ([x y])" - "\n ([x y & z])"]})))) + :fnl/arglist ["([x])" + "([x y])" + "([x y & z])"]})))) -- cgit v1.2.3