summaryrefslogtreecommitdiff
path: root/tests/end_to_end
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2017-04-09 23:03:35 +0200
committerlouiz’ <louiz@louiz.org>2017-04-09 23:05:32 +0200
commit68d6b829402592d2d7a00e6e7b5013077aaa745c (patch)
tree445ba11b0129fdc1df294c2d517586a8e12bd069 /tests/end_to_end
parent79b24d7eb5b729c000cce1b56ee1a64d914b9d4e (diff)
downloadbiboumi-68d6b829402592d2d7a00e6e7b5013077aaa745c.tar.gz
biboumi-68d6b829402592d2d7a00e6e7b5013077aaa745c.tar.bz2
biboumi-68d6b829402592d2d7a00e6e7b5013077aaa745c.tar.xz
biboumi-68d6b829402592d2d7a00e6e7b5013077aaa745c.zip
Properly handle multiline topics
fix #3254
Diffstat (limited to 'tests/end_to_end')
-rw-r--r--tests/end_to_end/__main__.py17
1 files changed, 17 insertions, 0 deletions
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,
+ "<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' />"),
+ 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,
+ "<message from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}' type='groupchat'><subject>FIRST LINE\nSECOND LINE.</subject></message>"),
+ 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(),