summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
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