Skip to content

Commit

Permalink
[calc] Add tests for potential problems with the calc module.
Browse files Browse the repository at this point in the history
- Added as a separate commit to confirm that the problem with .c 0.9*10
  exists and is fixed.
  • Loading branch information
ari-koivula committed Aug 10, 2014
1 parent 3cac2d8 commit 6b6ac8d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 6b6ac8d

Please sign in to comment.