summaryrefslogtreecommitdiffstats
path: root/tests/019
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-10-22 22:43:15 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-10-22 22:43:15 -0700
commit786ee416f9d5aba650d95176f471bb4cbe901007 (patch)
tree72513127392bb0f5d104e01e218dac4da5bc5924 /tests/019
parent72a6aaf189b6390bc2bce661155239373f6b906d (diff)
downloadtxr-786ee416f9d5aba650d95176f471bb4cbe901007.tar.gz
txr-786ee416f9d5aba650d95176f471bb4cbe901007.tar.bz2
txr-786ee416f9d5aba650d95176f471bb4cbe901007.zip
load-time: new tests.
Add three tests; the first and third fail. * tests/019/load-time.tl: New file.
Diffstat (limited to 'tests/019')
-rw-r--r--tests/019/load-time.tl30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/019/load-time.tl b/tests/019/load-time.tl
new file mode 100644
index 00000000..1a326aa2
--- /dev/null
+++ b/tests/019/load-time.tl
@@ -0,0 +1,30 @@
+(load "../common")
+
+(defvarl list)
+
+(test
+ [(compile-toplevel '(progn
+ (push 0 list)
+ (load-time (push 1 list))
+ list))]
+ (0 1))
+
+(zap list)
+
+(test
+ [(compile-toplevel '(progn
+ (push 0 list)
+ (lambda ()
+ (load-time (push 1 list)))
+ list))]
+ (0 1))
+
+(zap list)
+
+(test
+ [(compile-toplevel '(progn
+ (load-time (push 0 list))
+ (lambda ()
+ (load-time (push 1 list)))
+ list))]
+ (1 0))