aboutsummaryrefslogtreecommitdiff
path: root/test/testsupport.lua
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2011-05-25 20:57:22 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2011-05-25 20:57:22 +0000
commit3a8ba90dfb0c2eb224f317dd692ede426691e72a (patch)
treefe1cc5379a2e0e031663fe9c15d908653844bc73 /test/testsupport.lua
parentbce60be30fe8e9c1b0eb33128c23c93d7bca5303 (diff)
downloadluasocket-3a8ba90dfb0c2eb224f317dd692ede426691e72a.tar.gz
luasocket-3a8ba90dfb0c2eb224f317dd692ede426691e72a.tar.bz2
luasocket-3a8ba90dfb0c2eb224f317dd692ede426691e72a.zip
Saving before big changes to support IPv6.
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