From 6b6ac8d19164c551c8b8ffbace3043b4222c4aa1 Mon Sep 17 00:00:00 2001 From: Ari Koivula Date: Mon, 11 Aug 2014 02:25:11 +0300 Subject: [PATCH] [calc] Add tests for potential problems with the calc module. - Added as a separate commit to confirm that the problem with .c 0.9*10 exists and is fixed. --- calc.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/calc.py b/calc.py index f7a23b2b6c..0c9931029e 100644 --- a/calc.py +++ b/calc.py @@ -22,6 +22,12 @@ @commands('c', 'calc') @example('.c 5 + 3', '8') +@example('.c 0.9*10', '9') +@example('.c 10*0.9', '9') +@example('.c 2*(1+2)*3', '18') +@example('.c 2**10', '1024') +@example('.c 5 // 2', '2') +@example('.c 5 / 2', '2.5') def c(bot, trigger): """Evaluate some calculation.""" if not trigger.group(2):