summaryrefslogtreecommitdiff
path: root/tests/fn.fnl
diff options
context:
space:
mode:
authorAndrey Orst <andreyorst@gmail.com>2021-01-19 16:46:00 +0000
committerAndrey Orst <andreyorst@gmail.com>2021-01-19 16:46:00 +0000
commit270beed0505ef47159d94fb162ff4840958f3ce5 (patch)
tree6504ecb114419b0dd3055e509abd8b602586f614 /tests/fn.fnl
parenta2b08f721c28b3b56a802031bc35df6a68b219d8 (diff)
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
Diffstat (limited to 'tests/fn.fnl')
-rw-r--r--tests/fn.fnl27
1 files changed, 20 insertions, 7 deletions
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])"]}))))