summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-07-23 17:00:56 +0100
committerubq323 <ubq323@ubq323.website>2024-07-23 17:00:56 +0100
commitaa0485fe33204169724d020f9c5e3b91e558ab1e (patch)
tree909ea369aa38854fe98396c61ecab6c600533f7a /tests
parent726f9e814b29b4496d07c92323dc55dcf93c2a87 (diff)
add pend builtin function
Diffstat (limited to 'tests')
-rw-r--r--tests/pend.bth25
-rw-r--r--tests/pend.out19
2 files changed, 44 insertions, 0 deletions
diff --git a/tests/pend.bth b/tests/pend.bth
new file mode 100644
index 0000000..9a37f00
--- /dev/null
+++ b/tests/pend.bth
@@ -0,0 +1,25 @@
+(def xs [
+ (, 10)
+ (, [100 200])
+
+ (, 22 33)
+ (, 11 [111 222])
+ (, [333 444] 99)
+ (, [555 666] [777 888])
+
+ (, 10 11 12)
+ (, 10 11 [20 30])
+ (, 10 [222 333] 99)
+ (, 10 [22 33] [44 55])
+ (, [100 200] 33 44)
+ (, [100 200] 33 [444 555])
+ (, [100 200] [33 44] 55)
+ (, [100 200] [333 444] [555 666])
+
+ (, [])
+ (, [1])
+ (, 10 [])
+ (, [] 20)
+ (, [] [])
+])
+(each (x xs) (say x))
diff --git a/tests/pend.out b/tests/pend.out
new file mode 100644
index 0000000..44239f7
--- /dev/null
+++ b/tests/pend.out
@@ -0,0 +1,19 @@
+[ 10 ]
+[ 100 200 ]
+[ 22 33 ]
+[ 11 111 222 ]
+[ 333 444 99 ]
+[ 555 666 777 888 ]
+[ 10 11 12 ]
+[ 10 11 20 30 ]
+[ 10 222 333 99 ]
+[ 10 22 33 44 55 ]
+[ 100 200 33 44 ]
+[ 100 200 33 444 555 ]
+[ 100 200 33 44 55 ]
+[ 100 200 333 444 555 666 ]
+[ ]
+[ 1 ]
+[ 10 ]
+[ 20 ]
+[ ]