From 68d6b829402592d2d7a00e6e7b5013077aaa745c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sun, 9 Apr 2017 23:03:35 +0200 Subject: Properly handle multiline topics fix #3254 --- tests/end_to_end/__main__.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests/end_to_end') diff --git a/tests/end_to_end/__main__.py b/tests/end_to_end/__main__.py index bb5eb1c..d08d3ae 100644 --- a/tests/end_to_end/__main__.py +++ b/tests/end_to_end/__main__.py @@ -707,6 +707,23 @@ if __name__ == '__main__': ), partial(expect_stanza, "/message[@from='#foo%{irc_server_one}/{nick_one}'][@type='groupchat']/subject[text()='TOPIC TEST']"), ]), + Scenario("multiline_topic", + [ + handshake_sequence(), + # User joins + partial(send_stanza, + ""), + connection_sequence("irc.localhost", '{jid_one}/{resource_one}'), + partial(expect_stanza, + "/message/body"), + partial(expect_stanza, "/presence"), + partial(expect_stanza, "/message[@from='#foo%{irc_server_one}'][@type='groupchat']/subject[not(text())]"), + + # User tries to set a multiline topic + partial(send_stanza, + "FIRST LINE\nSECOND LINE."), + partial(expect_stanza, "/message[@from='#foo%{irc_server_one}/{nick_one}'][@type='groupchat'][@to='{jid_one}/{resource_one}']/subject[text()='FIRST LINE SECOND LINE.']"), + ]), Scenario("channel_basic_join_on_fixed_irc_server", [ handshake_sequence(), -- cgit v1.2.3