diff options
| author | Andrey Orst <andreyorst@gmail.com> | 2020-11-02 22:33:25 +0300 |
|---|---|---|
| committer | Andrey Orst <andreyorst@gmail.com> | 2020-11-02 22:33:25 +0300 |
| commit | 34ae8addc83267960d0b2daede2bcc91ea24d809 (patch) | |
| tree | 68251c66d3a0a71252b090cfe13d2fbf4c2bc67a /macros_test.fnl | |
| parent | d7ebb3e607da6444d8215b1ee273c4247489f862 (diff) | |
feature(macros): support attribute table in def and defonce
Diffstat (limited to 'macros_test.fnl')
| -rw-r--r-- | macros_test.fnl | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/macros_test.fnl b/macros_test.fnl index b8556e8..3ed5ad1 100644 --- a/macros_test.fnl +++ b/macros_test.fnl @@ -94,16 +94,21 @@ (deftest def-macros (testing def - (def a 10) + (def {:dynamic true} a 10) (assert-eq a 10) + (set a 20) + (assert-eq a 20) (def a {}) (assert-eq a {}) (def a.b 10) (assert-eq a.b 10) - (assert-eq b 10)) + (assert-eq b 10) + (def :dynamic c 10) + (set c 15) + (assert-eq c 15)) (testing defonce - (defonce a 10) + (defonce {:dynamic true} a 10) (assert-eq a 10) (defonce a {}) (assert-eq a 10) |