aboutsummaryrefslogtreecommitdiffstats
path: root/_pytest/test_topic_command.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2020-03-29 03:16:08 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2020-04-19 12:22:17 +0200
commit856159d8e5ceff5f678ab4d5a8ecb2ca6b972b0a (patch)
tree8dc0a4d2a844556d7943d7ad592444ae774924f3 /_pytest/test_topic_command.py
parent15168752c666d821b55a3074cbab9d6d857af5d6 (diff)
downloadwee-slack-856159d8e5ceff5f678ab4d5a8ecb2ca6b972b0a.tar.gz
Support newlines in the /topic command
Fixes #728
Diffstat (limited to '_pytest/test_topic_command.py')
-rw-r--r--_pytest/test_topic_command.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/_pytest/test_topic_command.py b/_pytest/test_topic_command.py
index 5224ab7..79a26d3 100644
--- a/_pytest/test_topic_command.py
+++ b/_pytest/test_topic_command.py
@@ -19,6 +19,13 @@ def test_parse_topic_with_text():
assert topic == 'some topic text'
+def test_parse_topic_with_text_with_newline():
+ channel_name, topic = parse_topic_command('/topic some topic text\nsecond line')
+
+ assert channel_name is None
+ assert topic == 'some topic text\nsecond line'
+
+
def test_parse_topic_with_delete():
channel_name, topic = parse_topic_command('/topic -delete')