mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 02:49:27 +01:00
Aka: Add recursivity test.
This commit is contained in:
parent
e68e7f36de
commit
d5c0df39f3
@ -53,7 +53,8 @@ class FunctionsTest(SupyTestCase):
|
||||
self.assertEqual(Aka.findBiggestDollar('$10 bar $1'), 10)
|
||||
|
||||
class AkaChannelTestCase(ChannelPluginTestCase):
|
||||
plugins = ('Aka', 'Filter', 'Utilities', 'Format', 'Reply')
|
||||
plugins = ('Aka', 'Conditional', 'Filter', 'Math', 'Utilities',
|
||||
'Format', 'Reply')
|
||||
|
||||
def testDoesNotOverwriteCommands(self):
|
||||
# We don't have dispatcher commands anymore
|
||||
@ -148,6 +149,13 @@ class AkaChannelTestCase(ChannelPluginTestCase):
|
||||
self.assertResponse('foo bar', 'spam')
|
||||
self.assertResponse('foo', 'egg')
|
||||
|
||||
def testRecursivity(self):
|
||||
self.assertNotError('aka add fact '
|
||||
r'"cif [nceq $1 0] \"echo 1\" '
|
||||
r'\"calc $1 * [fact [calc $1 - 1]]\""')
|
||||
self.assertResponse('fact 4', '24')
|
||||
self.assertRegexp('fact 50', 'more nesting')
|
||||
|
||||
class AkaTestCase(PluginTestCase):
|
||||
plugins = ('Aka', 'User')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user