aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2004-07-01 05:38:44 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2004-07-01 05:38:44 +0000
commit2562738e2db9d7654c48c10247e683215e09b4a5 (patch)
tree08dcd456594d76d5853e535a8a3b6ac1fdd27fdb
parent197aef23ce36844e86e732f26af1df9fc5f149da (diff)
downloadluasocket-2562738e2db9d7654c48c10247e683215e09b4a5.tar.gz
luasocket-2562738e2db9d7654c48c10247e683215e09b4a5.tar.bz2
luasocket-2562738e2db9d7654c48c10247e683215e09b4a5.zip
Forgot a few files.
-rw-r--r--FIX1
-rw-r--r--test/excepttest.lua6
-rw-r--r--test/unixtest.lua10
3 files changed, 17 insertions, 0 deletions
diff --git a/FIX b/FIX
index 0972403..c2b04e0 100644
--- a/FIX
+++ b/FIX
@@ -7,3 +7,4 @@ new timming functions. higher resolution, no wrap around
7bug fixes in the manual 7bug fixes in the manual
8getfd missing cast 8getfd missing cast
9added unix domain support example 9added unix domain support example
10fixed local domain socket kludge of name size
diff --git a/test/excepttest.lua b/test/excepttest.lua
new file mode 100644
index 0000000..ce9f197
--- /dev/null
+++ b/test/excepttest.lua
@@ -0,0 +1,6 @@
1local socket = require("socket")
2try = socket.newtry(function()
3 print("finalized!!!")
4end)
5try = socket.protect(try)
6print(try(nil, "it works"))
diff --git a/test/unixtest.lua b/test/unixtest.lua
new file mode 100644
index 0000000..e70b356
--- /dev/null
+++ b/test/unixtest.lua
@@ -0,0 +1,10 @@
1socket = require("socket")
2f = loadlib("etc-1.0.dylib", "unix_open")
3f(socket)
4u = socket.unix()
5print(u:bind("/tmp/luasocket"))
6print(u:listen())
7c = u:accept()
8while 1 do
9 print(assert(c:receive()))
10end