diff options
Diffstat (limited to 'tests/fn.fnl')
| -rw-r--r-- | tests/fn.fnl | 27 |
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])"]})))) |