fish-shell/tests/math.in
Kurtis Rader c95b9f06e1 Implement support for bare vars by math
This change allows you to type `math x + 3` rather than `math $x + 3`.

Another step to resolving issue #3157.
2017-08-23 20:41:45 -07:00

25 lines
388 B
Fish

logmsg Validate basic expressions
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 "7^2"
math -1 + 1
math '-2 * -2'
math 5 \* -2
math -- -4 / 2
math -- '-4 * 2'
logmsg Validate how bare variables in an epxression are handled
math x + 1
set x 1
math x + 1
set x 3
set y 1.5
math '-x * y'
math -s1 '-x * y'