summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2010-10-21 16:21:28 -0400
committerLance Stout <lancestout@gmail.com>2010-10-21 16:21:28 -0400
commit8f55704928ac16599a62678fc1c3a83d83f43a21 (patch)
tree46ec7dffa213226c651b45a2ba5e4796d9959b05 /tests
parentd88999691cd36fa9049f8bda522d394d81ba1365 (diff)
downloadslixmpp-8f55704928ac16599a62678fc1c3a83d83f43a21.tar.gz
slixmpp-8f55704928ac16599a62678fc1c3a83d83f43a21.tar.bz2
slixmpp-8f55704928ac16599a62678fc1c3a83d83f43a21.tar.xz
slixmpp-8f55704928ac16599a62678fc1c3a83d83f43a21.zip
Fixed mixed text and elements bug in tostring.
XML of the form <a>foo <b>bar</b> baz</a> was outputted as <a>foo <b>bar</b> baz baz</a>. Includes unit test.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_tostring.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_tostring.py b/tests/test_tostring.py
index 45f405ce..3e9df524 100644
--- a/tests/test_tostring.py
+++ b/tests/test_tostring.py
@@ -73,6 +73,16 @@ class TestToString(SleekTest):
message="The xmlns parameter was not used properly.",
xmlns='foo')
+ def testTailContent(self):
+ """
+ Test that elements of the form <a>foo <b>bar</b> baz</a> only
+ include " baz" once.
+ """
+ self.tryTostring(
+ original='<a>foo <b>bar</b> baz</a>',
+ message='Element tail content is incorrect.')
+
+
def testStanzaNs(self):
"""
Test using the stanza_ns tostring parameter, which will prevent