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.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/lua/chupacabra/test_chupacabra.lua b/lua/chupacabra/test_chupacabra.lua
index 1eb5a48..b2e5ef2 100644
--- a/lua/chupacabra/test_chupacabra.lua
+++ b/lua/chupacabra/test_chupacabra.lua
@@ -21,11 +21,16 @@ local function test_case(input, expected_output)
     print("Test passed: " .. input .. " => " .. output_str)
 end
 
-
+test_case("[1 1 1] [2 3 4] @+", {3, 4, 5})
+test_case("[1 1 1] 2 @+", {3, 3, 3})
+test_case("[2 3 4] 3 @-", {1, 0, -1})
+test_case("[2 3 4] 3 @*", {6, 9, 12})
+test_case("[2 3 4] [2 3 4] @*", {4, 9, 16})
+test_case("2 [12 6 4] @/", {6.0, 3.0, 2.0})
+test_case("[2 2 2] [24 12 16] @/", {12.0, 6.0, 8.0})
 test_case("1", 1)  -- 1
 test_case("2 1 pop", 2) -- 2
 test_case("[1 1]", {1, 1})
-test_case("[1 2 3] map+", {2, 3, 4})
 test_case("3 4 +", 7)  -- 3 + 4 = 7
 test_case("5 2 -", 3)  -- 5 - 2 = 3
 test_case("2 3 *", 6)  -- 2 * 3 = 6