aboutsummaryrefslogtreecommitdiffstats
path: root/lualdap/tests/test.lua
diff options
context:
space:
mode:
authorTomas Guisasola <tomas@luaforge.net>2003-09-03 11:07:51 +0000
committerTomas Guisasola <tomas@luaforge.net>2003-09-03 11:07:51 +0000
commit9be419e519e4bcdb96ac734467d341011661d384 (patch)
treee888daba3554563f79c566e479ecf14a650a0f00 /lualdap/tests/test.lua
parentCorrecao do bug de desalocacao do objeto search. (diff)
downloadlualdap-9be419e519e4bcdb96ac734467d341011661d384.tar.xz
lualdap-9be419e519e4bcdb96ac734467d341011661d384.zip
Acrescimo de teste de desalocacao de objetos search.
Modificacao na funcao que recebe os resultados da busca para fechar o objeto quando receber a ultima mensagem.
Diffstat (limited to 'lualdap/tests/test.lua')
-rwxr-xr-xlualdap/tests/test.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/lualdap/tests/test.lua b/lualdap/tests/test.lua
index 3778a26..831b13a 100755
--- a/lualdap/tests/test.lua
+++ b/lualdap/tests/test.lua
@@ -1,7 +1,7 @@
#!/usr/local/bin/lua
---------------------------------------------------------------------
-- LuaLDAP test file.
--- $Id: test.lua,v 1.7 2003-09-02 17:01:29 tomas Exp $
+-- $Id: test.lua,v 1.8 2003-09-03 11:07:51 tomas Exp $
-- This test will create a copy of an existing entry on the
-- directory to work on. This new entry will be modified,
-- renamed and deleted at the end.
@@ -106,6 +106,7 @@ function basic_test ()
-- reopen the connection.
LD = CONN_OK (lualdap.open_simple (HOSTNAME, WHO, PASSWORD, true))
CLOSED_LD = ld
+ collectgarbage()
end
@@ -147,6 +148,7 @@ function search_test_1 ()
sizelimit = 1,
filter = "(uid=pedromaia)",
}()
+collectgarbage()
end
@@ -242,9 +244,10 @@ function search_test_2 ()
dn, e1 = iter()
assert (type(dn) == "nil")
assert (type(e1) == "nil")
- dn, e1 = iter()
- assert (type(dn) == "nil")
- assert (type(e1) == "nil")
+ assert2 (false, pcall (iter))
+ -- checking collecting search objects.
+ local dn, entry = LD:search { base = BASE, scope = "base" }()
+ collectgarbage()
end