diff --git a/plugins/Aka/test.py b/plugins/Aka/test.py index 1b4dbec0d..d386ce312 100644 --- a/plugins/Aka/test.py +++ b/plugins/Aka/test.py @@ -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')