summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-02-25 22:53:06 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-02-26 00:14:08 (GMT)
commitc2886c9ff6152130e2adb006f84268f972e629cc (patch)
tree57093d110044ae97075d26fb238e6ae77e96414c /Sluift/client_test.lua
parent7e4b8e330c99a1db81bdf12b7aab41f5890625e5 (diff)
downloadswift-contrib-c2886c9ff6152130e2adb006f84268f972e629cc.zip
swift-contrib-c2886c9ff6152130e2adb006f84268f972e629cc.tar.bz2
Some more sluift tweaks.
Diffstat (limited to 'Sluift/client_test.lua')
-rw-r--r--Sluift/client_test.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/Sluift/client_test.lua b/Sluift/client_test.lua
index 4eebf0c..1652083 100644
--- a/Sluift/client_test.lua
+++ b/Sluift/client_test.lua
@@ -6,11 +6,13 @@ client2_jid = os.getenv("SWIFT_CLIENTTEST_JID") .. "/Client2"
password = os.getenv("SWIFT_CLIENTTEST_PASS")
print "Connecting client 1"
-client1 = sluift.connect(client1_jid, password)
+client1 = sluift.new_client(client1_jid, password)
+client1:connect()
client1:send_presence("I'm here")
print "Connecting client 2"
-client2 = sluift.connect(client2_jid, password)
+client2 = sluift.new_client(client2_jid, password)
+client2:connect()
client2:send_presence("I'm here")
print "Checking version of client 2 from client 1"
@@ -28,5 +30,9 @@ received_message = client2:for_event(function(event)
end)
assert(received_message == "Hello")
+print "Retrieving the roster"
+roster = client1:get_roster()
+table.foreach(roster, print)
+
client1:disconnect()
client2:disconnect()