about summary refs log tree commit diff stats
path: root/test.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-11-30 23:03:50 -0800
committerKartik K. Agaram <vc@akkartik.com>2022-11-30 23:03:50 -0800
commita8a8965b1b313acb7a5d7395aa72c68348e0ddb2 (patch)
tree61b6a22d536709d07365a7373fd533359c1d1218 /test.lua
parent4335669ecc00bb940c53217076dd422f3eb1c0e6 (diff)
downloadlines.love-a8a8965b1b313acb7a5d7395aa72c68348e0ddb2.tar.gz
compare nested tables
Diffstat (limited to 'test.lua')
-rw-r--r--test.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/test.lua b/test.lua
index b2b6f3c..ab890b8 100644
--- a/test.lua
+++ b/test.lua
@@ -32,12 +32,12 @@ function eq(a, b)
   if type(a) == 'table' then
     if #a ~= #b then return false end
     for k, v in pairs(a) do
-      if b[k] ~= v then
+      if not eq(b[k], v) then
         return false
       end
     end
     for k, v in pairs(b) do
-      if a[k] ~= v then
+      if not eq(a[k], v) then
         return false
       end
     end