Tests: test non-ascii nicks/lines from supybot
darcs-hash:20091011213745-82ea9-6218bec992e7615d30407d50153c07364a1826df.gz
This commit is contained in:
parent
ded7f451c2
commit
1506a171be
13
test.py
13
test.py
@ -48,8 +48,8 @@ class MeetBotTestCase(ChannelPluginTestCase):
|
|||||||
# not here, it's not checked for.
|
# not here, it's not checked for.
|
||||||
match_pairs = (('#startmeeting', 'Meeting started'),
|
match_pairs = (('#startmeeting', 'Meeting started'),
|
||||||
('#endmeeting', 'Meeting ended'),
|
('#endmeeting', 'Meeting ended'),
|
||||||
('#topic (.*)', 1),
|
('#topic +(.*)', 1),
|
||||||
('#meetingtopic (.*)', 1),
|
('#meetingtopic +(.*)', 1),
|
||||||
('#meetingname','The meeting name has been set to'),
|
('#meetingname','The meeting name has been set to'),
|
||||||
('#chair', 'Current chairs:'),
|
('#chair', 'Current chairs:'),
|
||||||
('#unchair', 'Current chairs:'),
|
('#unchair', 'Current chairs:'),
|
||||||
@ -70,11 +70,14 @@ class MeetBotTestCase(ChannelPluginTestCase):
|
|||||||
groups = re.search(test[0], line).groups()
|
groups = re.search(test[0], line).groups()
|
||||||
# Output pattern depends on input pattern
|
# Output pattern depends on input pattern
|
||||||
if isinstance(test[1], int):
|
if isinstance(test[1], int):
|
||||||
assert re.search(re.escape(groups[test[1]-1]),
|
print groups[test[1]-1], reply
|
||||||
reply), 'line "%s" gives output "%s"'%(line, reply)
|
assert re.search(re.escape(groups[test[1]-1]), reply),\
|
||||||
|
'line "%s" gives output "%s"'%(line, reply)
|
||||||
# Just match the given pattern.
|
# Just match the given pattern.
|
||||||
else:
|
else:
|
||||||
assert re.search(test[1], reply), 'line "%s" gives output "%s"'%(line, reply)
|
print test[1], reply
|
||||||
|
assert re.search(test[1], reply.decode('utf-8')), \
|
||||||
|
'line "%s" gives output "%s"'%(line, reply)
|
||||||
|
|
||||||
|
|
||||||
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
|
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
|
||||||
|
@ -34,6 +34,16 @@ evil code to mess up html <b><i><u>
|
|||||||
#topic test removing item from the minutes (nothing should be here)
|
#topic test removing item from the minutes (nothing should be here)
|
||||||
#info this shouldn't appear in the minutes
|
#info this shouldn't appear in the minutes
|
||||||
#undo
|
#undo
|
||||||
|
#topic üñìcöde stuff
|
||||||
|
#chair üñìcöde
|
||||||
|
#unchair üñìcöde
|
||||||
|
#info üñìcöde
|
||||||
|
#idea üñìcöde
|
||||||
|
#help üñìcöde
|
||||||
|
#action üñìcöde
|
||||||
|
#agreed üñìcöde
|
||||||
|
#accepted üñìcöde
|
||||||
|
#rejected üñìcöde
|
||||||
#endmeeting
|
#endmeeting
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user