about summary refs log tree commit diff stats
path: root/lua/chupacabra/test_chupacabra.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/chupacabra/test_chupacabra.lua')
-rw-r--r--lua/chupacabra/test_chupacabra.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/lua/chupacabra/test_chupacabra.lua b/lua/chupacabra/test_chupacabra.lua
index 0a58cc4..e2f54b1 100644
--- a/lua/chupacabra/test_chupacabra.lua
+++ b/lua/chupacabra/test_chupacabra.lua
@@ -48,4 +48,10 @@ tc("[1 2 3 4 5] [6 7 8 9 10] [10 11 12 13] @..", {1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
 tc("[10 20 30] 1 @", 10)  -- access array element at a given index (1-based)
 tc("[10 20 30] 2 @ 20 +", 40)  -- this leaves nothing on the stack, since @ consumes the array and doesn't replace it on to the stack
 tc("1 2 3 : +", 6) -- : duplicates the top element on the stack
-tc("100 10 20 ?", 10) -- ? swaps the top two elements on the stack
\ No newline at end of file
+tc("100 10 20 ?", 10) -- ? swaps the top two elements on the stack
+tc("1 1 =", true) -- = compares the top two elements on the stack
+tc("1 2 =", false)
+tc("[1 2 3] [1 2 3] =", false) -- arrays are not equal, but their values can be
+tc("[1 2 3] [1 2 3] @=", {true, true, true})
+tc("[1 2 3] [1 2 4] @=", {true, true, false})
+