diff options
author | ubq323 <ubq323@ubq323.website> | 2024-06-26 22:45:16 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-06-26 22:45:16 +0100 |
commit | a559125a2d7af771784614b7a2092cc7fb707345 (patch) | |
tree | 4e4f31197d28a41b5c62fdd19086295cf0acad84 /tests | |
parent | 2e62b41072738142dea9f0b5dd5d2d22455c7616 (diff) |
array literals
Diffstat (limited to 'tests')
-rw-r--r-- | tests/arr2.bth | 1 | ||||
-rw-r--r-- | tests/arr2.out | 1 | ||||
-rw-r--r-- | tests/arr3.bth | 1 | ||||
-rw-r--r-- | tests/arr3.out | 1 | ||||
-rw-r--r-- | tests/arr4.bth | 4 | ||||
-rw-r--r-- | tests/arr4.out | 1 | ||||
-rw-r--r-- | tests/arr5.bth | 3 | ||||
-rw-r--r-- | tests/arr5.out | 1 |
8 files changed, 13 insertions, 0 deletions
diff --git a/tests/arr2.bth b/tests/arr2.bth new file mode 100644 index 0000000..a405bde --- /dev/null +++ b/tests/arr2.bth @@ -0,0 +1 @@ +(say (append [1 2 3 4] 99)) diff --git a/tests/arr2.out b/tests/arr2.out new file mode 100644 index 0000000..42a9264 --- /dev/null +++ b/tests/arr2.out @@ -0,0 +1 @@ +[ 1 2 3 4 99 ] diff --git a/tests/arr3.bth b/tests/arr3.bth new file mode 100644 index 0000000..c2bce88 --- /dev/null +++ b/tests/arr3.bth @@ -0,0 +1 @@ +(say (append [1 2 (+ 1 2) (let (x 2) (* x x))] (+ 2 3))) diff --git a/tests/arr3.out b/tests/arr3.out new file mode 100644 index 0000000..f5d7903 --- /dev/null +++ b/tests/arr3.out @@ -0,0 +1 @@ +[ 1 2 3 4 5 ] diff --git a/tests/arr4.bth b/tests/arr4.bth new file mode 100644 index 0000000..2521e63 --- /dev/null +++ b/tests/arr4.bth @@ -0,0 +1,4 @@ +(say + (let (A (append [1 2 3 (let (x 2) (* x x)) 5] 6)) + (let (B (append A 7)) (append B 8)) + (append (append A 9) 10))) diff --git a/tests/arr4.out b/tests/arr4.out new file mode 100644 index 0000000..c508125 --- /dev/null +++ b/tests/arr4.out @@ -0,0 +1 @@ +[ 1 2 3 4 5 6 7 8 9 10 ] diff --git a/tests/arr5.bth b/tests/arr5.bth new file mode 100644 index 0000000..79d5a7d --- /dev/null +++ b/tests/arr5.bth @@ -0,0 +1,3 @@ +(set A [1 2 3]) +(let (B A) (append B 10)) +(say A) diff --git a/tests/arr5.out b/tests/arr5.out new file mode 100644 index 0000000..7704f22 --- /dev/null +++ b/tests/arr5.out @@ -0,0 +1 @@ +[ 1 2 3 10 ] |