diff options
author | ubq323 <ubq323@ubq323.website> | 2024-06-26 19:27:42 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-06-26 19:27:42 +0100 |
commit | 2e62b41072738142dea9f0b5dd5d2d22455c7616 (patch) | |
tree | f47ce547de39fb69b02eb70990c9485489f1e574 /tests | |
parent | 6deeb9630d4b4e7d672ab851dcd4fe3d0d3d2865 (diff) |
add arrays, appending, getting length, indexing
Diffstat (limited to 'tests')
-rw-r--r-- | tests/arr1.bth | 9 | ||||
-rw-r--r-- | tests/arr1.out | 5 | ||||
-rw-r--r-- | tests/nilcall.bth | 1 | ||||
-rw-r--r-- | tests/nilcall.out | 1 |
4 files changed, 16 insertions, 0 deletions
diff --git a/tests/arr1.bth b/tests/arr1.bth new file mode 100644 index 0000000..0d06759 --- /dev/null +++ b/tests/arr1.bth @@ -0,0 +1,9 @@ +(set A (arr)) +(say A) +(say (len A)) +(append A 10) +(append A 20) +(append A 30) +(say A) +(say (len A)) +(say (A 1)) diff --git a/tests/arr1.out b/tests/arr1.out new file mode 100644 index 0000000..3e5e246 --- /dev/null +++ b/tests/arr1.out @@ -0,0 +1,5 @@ +[ ] +0 +[ 10 20 30 ] +3 +20 diff --git a/tests/nilcall.bth b/tests/nilcall.bth new file mode 100644 index 0000000..27ff7a2 --- /dev/null +++ b/tests/nilcall.bth @@ -0,0 +1 @@ +(nil 4) diff --git a/tests/nilcall.out b/tests/nilcall.out new file mode 100644 index 0000000..ba2231b --- /dev/null +++ b/tests/nilcall.out @@ -0,0 +1 @@ +cannot call nil |