aboutsummaryrefslogtreecommitdiff
path: root/test/testclnt.lua
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2003-03-28 21:08:50 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2003-03-28 21:08:50 +0000
commitf18d1b7cd0ec4708518ab5e18ea33b6eadca0301 (patch)
treee831c6b1957af47db1301675b52c0d2a2e315fa7 /test/testclnt.lua
parent307603b24dde69eac62d2cb52123488137520c9c (diff)
downloadluasocket-f18d1b7cd0ec4708518ab5e18ea33b6eadca0301.tar.gz
luasocket-f18d1b7cd0ec4708518ab5e18ea33b6eadca0301.tar.bz2
luasocket-f18d1b7cd0ec4708518ab5e18ea33b6eadca0301.zip
Closer to release...
Diffstat (limited to 'test/testclnt.lua')
-rw-r--r--test/testclnt.lua12
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 @@
1HOST = HOST or "localhost" 1host = host or "localhost"
2PORT = PORT or "8080" 2port = port or "8080"
3 3
4function pass(...) 4function 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
89end 89end
90reconnect = tcpreconnect 90reconnect = tcpreconnect
91 91
92pass("attempting control connection...") 92pass("attempting control connection...")
93control, err = socket.connect(HOST, PORT) 93control, err = socket.connect(host, port)
94if err then fail(err) 94if err then fail(err)
95else pass("connected!") end 95else 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
112end 112end
113 113