aboutsummaryrefslogtreecommitdiff
path: root/test/testsupport.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/testsupport.lua')
-rw-r--r--test/testsupport.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/testsupport.lua b/test/testsupport.lua
index acad8f5..b986088 100644
--- a/test/testsupport.lua
+++ b/test/testsupport.lua
@@ -1,13 +1,13 @@
1function readfile(name) 1function readfile(name)
2 local f = io.open(name, "rb") 2 local f = io.open(name, "rb")
3 if not f then return nil end 3 if not f then return nil end
4 local s = f:read("*a") 4 local s = f:read("*a")
5 f:close() 5 f:close()
6 return s 6 return s
7end 7end
8 8
9function similar(s1, s2) 9function similar(s1, s2)
10 return string.lower(string.gsub(s1 or "", "%s", "")) == 10 return string.lower(string.gsub(s1 or "", "%s", "")) ==
11 string.lower(string.gsub(s2 or "", "%s", "")) 11 string.lower(string.gsub(s2 or "", "%s", ""))
12end 12end
13 13
@@ -28,7 +28,7 @@ local set = rawset
28local warn = print 28local warn = print
29 29
30local setglobal = function(table, key, value) 30local setglobal = function(table, key, value)
31 warn("changed " .. key) 31 warn("changed " .. key)
32 set(table, key, value) 32 set(table, key, value)
33end 33end
34 34