From 7023b25223b832fb5741514aa9b235a1fc06fe90 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sat, 6 Sep 2003 05:29:35 +0000 Subject: [PATCH] Added tests for the longest, stupidest bug in existence. --- test/test_FunCommands.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/test_FunCommands.py b/test/test_FunCommands.py index 0ac9fdb5a..54f42f381 100644 --- a/test/test_FunCommands.py +++ b/test/test_FunCommands.py @@ -56,6 +56,7 @@ class FunCommandsTest(PluginTestCase): def testCalc(self): self.assertResponse('calc 5*0.06', str(5*0.06)) + self.assertResponse('calc 2.0-7.0', str(2-7)) def testChr(self): for i in range(256): @@ -103,6 +104,11 @@ class FunCommandsTest(PluginTestCase): self.assertNotError('whois ohio-state.edu') self.assertError('whois slashdot.org') + def testRpn(self): + self.assertResponse('rpn 5 2 +', '7') + self.assertResponse('rpn 1 2 3 +', 'Stack: [1, 5]') + self.assertResponse('rpn 1 dup', 'Stack: [1, 1]') + self.assertResponse('rpn 2 3 4 + -', str(2-7))