diff options
| author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2003-03-28 21:08:50 +0000 |
|---|---|---|
| committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2003-03-28 21:08:50 +0000 |
| commit | f18d1b7cd0ec4708518ab5e18ea33b6eadca0301 (patch) | |
| tree | e831c6b1957af47db1301675b52c0d2a2e315fa7 /test/testclnt.lua | |
| parent | 307603b24dde69eac62d2cb52123488137520c9c (diff) | |
| download | luasocket-f18d1b7cd0ec4708518ab5e18ea33b6eadca0301.tar.gz luasocket-f18d1b7cd0ec4708518ab5e18ea33b6eadca0301.tar.bz2 luasocket-f18d1b7cd0ec4708518ab5e18ea33b6eadca0301.zip | |
Closer to release...
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 | ||
