diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2011-05-25 20:57:22 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2011-05-25 20:57:22 +0000 |
commit | 3a8ba90dfb0c2eb224f317dd692ede426691e72a (patch) | |
tree | fe1cc5379a2e0e031663fe9c15d908653844bc73 /test/testsupport.lua | |
parent | bce60be30fe8e9c1b0eb33128c23c93d7bca5303 (diff) | |
download | luasocket-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.lua | 14 |
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 @@ | |||
1 | function readfile(name) | 1 | function 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 |
7 | end | 7 | end |
8 | 8 | ||
9 | function similar(s1, s2) | 9 | function 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", "")) |
12 | end | 12 | end |
13 | 13 | ||
@@ -28,7 +28,7 @@ local set = rawset | |||
28 | local warn = print | 28 | local warn = print |
29 | 29 | ||
30 | local setglobal = function(table, key, value) | 30 | local setglobal = function(table, key, value) |
31 | warn("changed " .. key) | 31 | warn("changed " .. key) |
32 | set(table, key, value) | 32 | set(table, key, value) |
33 | end | 33 | end |
34 | 34 | ||