aboutsummaryrefslogtreecommitdiffstats
path: root/lualdap/tests
diff options
context:
space:
mode:
authorTomas Guisasola <tomas@luaforge.net>2003-06-16 16:41:15 +0000
committerTomas Guisasola <tomas@luaforge.net>2003-06-16 16:41:15 +0000
commitbf486bd844df001e0bd515e4c244f9fb5ef3e901 (patch)
tree1a629a39e72b10caa72eb0b45a6eab4960985ce4 /lualdap/tests
parentRemocao de comentarios. (diff)
downloadlualdap-bf486bd844df001e0bd515e4c244f9fb5ef3e901.tar.xz
lualdap-bf486bd844df001e0bd515e4c244f9fb5ef3e901.zip
Acrescimo da operacao de adicao.
Diffstat (limited to 'lualdap/tests')
-rwxr-xr-xlualdap/tests/test.lua19
1 files changed, 13 insertions, 6 deletions
diff --git a/lualdap/tests/test.lua b/lualdap/tests/test.lua
index b3261b6..c8ca831 100755
--- a/lualdap/tests/test.lua
+++ b/lualdap/tests/test.lua
@@ -1,6 +1,6 @@
#!/usr/local/bin/lua
-- LuaLDAP test file.
--- $Id: test.lua,v 1.2 2003-06-16 10:38:15 tomas Exp $
+-- $Id: test.lua,v 1.3 2003-06-16 16:41:15 tomas Exp $
function print_attrs (attrs)
io.write (string.format (" [dn] : %s\n", attrs.dn))
@@ -45,13 +45,20 @@ assert (pcall (ld.close, ld) == false)
local ld = assert (lualdap.open_simple (hostname, who, password))
-- search
-for msg, attrs in ld:search_attribs (base, "subtree", filter, attribs) do
- print_attrs (attrs)
-end
-print ("search ok")
+--for msg, attrs in ld:search_attribs (base, "subtree", filter, attribs) do
+ --print_attrs (attrs)
+--end
+--print ("search ok")
-- compare
-print("compare", ld:compare ("videoID=676DE,ou=video,dc=teste,dc=br", "videoTitulo", "Tecnologias de Video Digital"))
+--print("compare", ld:compare ("videoID=676DE,ou=video,dc=teste,dc=br", "videoTitulo", "Tecnologias de Video Digital"))
+
+-- add
+print("add", ld:add ("videoID=23042011,ou=video,dc=teste,dc=br", {
+ videoID = "23042011",
+ objectClass = { "objVideo", "objConteudo", },
+ videoTitulo = "Teste de inclusao",
+}))
-- modify
print("modify", ld:modify ("videoID=676DE,ou=video,dc=teste,dc=br", {