From 34ae8addc83267960d0b2daede2bcc91ea24d809 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Mon, 2 Nov 2020 22:33:25 +0300 Subject: feature(macros): support attribute table in def and defonce --- macros_test.fnl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'macros_test.fnl') 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) -- cgit v1.2.3