# HG changeset patch # User Matthew Wild # Date 1231522588 0 # Node ID 686b73503ce8ea5f55fa450267629094c94171f8 # Parent 734994b61907f056df2e51971f0755cdc73c587d Add test for previous commit diff -r 734994b61907 -r 686b73503ce8 tests/test.lua --- a/tests/test.lua Fri Jan 09 17:27:53 2009 +0000 +++ b/tests/test.lua Fri Jan 09 17:36:28 2009 +0000 @@ -25,7 +25,8 @@ dotest "core.stanza_router" dotest "core.s2smanager" dotest "core.configmanager" - + dotest "util.stanza" + dosingletest("test_sasl.lua", "latin1toutf8"); end diff -r 734994b61907 -r 686b73503ce8 tests/test_util_stanza.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test_util_stanza.lua Fri Jan 09 17:36:28 2009 +0000 @@ -0,0 +1,7 @@ + +function deserialize(deserialize, st) + local stanza = st.stanza("message", { a = "a" }); + + local stanza2 = deserialize(st.preserialize(stanza)); + assert_is(stanza2.last_add, "Deserialized stanza is missing last_add for adding child tags"); +end