summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-06-28 10:44:07 +0100
committerubq323 <ubq323@ubq323.website>2024-06-28 10:56:47 +0100
commitb51136defc2898c868e4a1b60025d5bb57347662 (patch)
treed69991826222e3ec0c1148d6a0b417e4badb019c /tests
parent2293fed1bb278068daaa9f20b752abeb3cf21c49 (diff)
def form for implicit scopes
Diffstat (limited to 'tests')
-rw-r--r--tests/letstar.out1
-rw-r--r--tests/vars6.bth11
-rw-r--r--tests/vars6.out8
-rw-r--r--tests/vars7.bth7
-rw-r--r--tests/vars7.out2
5 files changed, 29 insertions, 0 deletions
diff --git a/tests/letstar.out b/tests/letstar.out
new file mode 100644
index 0000000..3d4c7bf
--- /dev/null
+++ b/tests/letstar.out
@@ -0,0 +1 @@
+220
diff --git a/tests/vars6.bth b/tests/vars6.bth
new file mode 100644
index 0000000..30d3851
--- /dev/null
+++ b/tests/vars6.bth
@@ -0,0 +1,11 @@
+(do
+ (let (a 100 b 200 c 300) (say b))
+ (do
+ (let (a 100 b 200 c 300) (say b))
+ (def x 99)
+ (say "hii")
+ (say x)
+ (let (a 100 b 200 c 300) (say b))
+ (let (x 77) (say x))
+ (say x))
+ (let (a 100 b 200 c 300) (say b)))
diff --git a/tests/vars6.out b/tests/vars6.out
new file mode 100644
index 0000000..5d1335a
--- /dev/null
+++ b/tests/vars6.out
@@ -0,0 +1,8 @@
+200
+200
+hii
+99
+200
+77
+99
+200
diff --git a/tests/vars7.bth b/tests/vars7.bth
new file mode 100644
index 0000000..6bcbace
--- /dev/null
+++ b/tests/vars7.bth
@@ -0,0 +1,7 @@
+(do
+ (say (if (< 3 2)
+ "hii"
+ (do
+ (def x 100)
+ x)))
+ (let (a 100 b 200 c 300) (say b)))
diff --git a/tests/vars7.out b/tests/vars7.out
new file mode 100644
index 0000000..15c2ac3
--- /dev/null
+++ b/tests/vars7.out
@@ -0,0 +1,2 @@
+100
+200