diff options
Diffstat (limited to 'test/testclnt.lua')
| -rw-r--r-- | test/testclnt.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/testclnt.lua b/test/testclnt.lua index 7c65823..3e80a36 100644 --- a/test/testclnt.lua +++ b/test/testclnt.lua | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | HOST = HOST or "localhost" | 1 | host = host or "localhost" |
| 2 | PORT = PORT or "8080" | 2 | port = port or "8080" |
| 3 | 3 | ||
| 4 | function pass(...) | 4 | function pass(...) |
| 5 | local s = string.format(unpack(arg)) | 5 | local s = string.format(unpack(arg)) |
| @@ -83,14 +83,14 @@ function tcpreconnect() | |||
| 83 | if data then data:close() data = nil end | 83 | if data then data:close() data = nil end |
| 84 | data = server:accept() | 84 | data = server:accept() |
| 85 | ]] | 85 | ]] |
| 86 | data, err = socket.connect(HOST, PORT) | 86 | data, err = socket.connect(host, port) |
| 87 | if not data then fail(err) | 87 | if not data then fail(err) |
| 88 | else pass("connected!") end | 88 | else pass("connected!") end |
| 89 | end | 89 | end |
| 90 | reconnect = tcpreconnect | 90 | reconnect = tcpreconnect |
| 91 | 91 | ||
| 92 | pass("attempting control connection...") | 92 | pass("attempting control connection...") |
| 93 | control, err = socket.connect(HOST, PORT) | 93 | control, err = socket.connect(host, port) |
| 94 | if err then fail(err) | 94 | if err then fail(err) |
| 95 | else pass("connected!") end | 95 | else pass("connected!") end |
| 96 | 96 | ||
| @@ -104,10 +104,10 @@ function empty_connect() | |||
| 104 | if data then data:close() data = nil end | 104 | if data then data:close() data = nil end |
| 105 | data = server:accept() | 105 | data = server:accept() |
| 106 | ]] | 106 | ]] |
| 107 | data, err = socket.connect("", PORT) | 107 | data, err = socket.connect("", port) |
| 108 | if not data then | 108 | if not data then |
| 109 | pass("ok") | 109 | pass("ok") |
| 110 | data = socket.connect(HOST, PORT) | 110 | data = socket.connect(host, port) |
| 111 | else fail("should not have connected!") end | 111 | else fail("should not have connected!") end |
| 112 | end | 112 | end |
| 113 | 113 | ||
