Added a few more tests, and one for the case-preservation characteristics of karma with multiple arguments.

This commit is contained in:
Jeremy Fincher 2003-11-02 18:04:49 +00:00
parent 31ef30d961
commit e46e2483b7

View File

@ -80,11 +80,16 @@ if sqlite is not None:
finally:
conf.replyWhenNotCommand = False
self.assertRegexp('karma foobar', 'increased 1.*total.*1')
self.assertRegexp('karma FOOBAR', 'increased 1.*total.*1')
self.assertNoResponse('foobar--', 2)
self.assertRegexp('karma foobar', 'decreased 1.*total.*0')
self.assertNoResponse('foo++', 2)
self.assertNoResponse('bar--', 2)
self.assertRegexp('karma FOOBAR', 'decreased 1.*total.*0')
self.assertNoResponse('FOO++', 2)
self.assertNoResponse('BAR--', 2)
self.assertRegexp('karma foo bar foobar', '.*foo.*foobar.*bar.*')
self.assertRegexp('karma FOO BAR FOOBAR', '.*foo.*foobar.*bar.*')
self.assertRegexp('karma FOO BAR FOOBAR',
'.*FOO.*foobar.*BAR.*', flags=0)
# Test case-insensitive
self.assertNoResponse('MOO++', 2)
self.assertRegexp('karma moo', 'Karma for \'moo\'.*increased 1'