fish-shell/tests/math.in
Kurtis Rader 98449fec51 fix math regression
The previous change to use `argparse` for parity with every other
builtin and function introduced a regression. Invocations that start
with a negative number can fail because the negative value looks like an
invalid flag.
2017-07-14 16:03:31 -07:00

15 lines
280 B
Fish

math 3 / 2
math 10/6
math -s0 10 / 6
math -s3 10/6
math '10 % 6'
math -s0 '10 % 6'
math '23 % 7'
math --scale=6 '5 / 3 * 0.3'
math "1 + 1233242342353453463458972349873489273984873289472914712894791824712941"
math -1 + 1
math '-2 * -2'
math 5 \* -2
math -- -4 / 2
math -- '-4 * 2'