fish-shell/tests/math.err
Fabian Homborg 2d08b5ee8a [math] Add tests for runtime errors
And fix "isinfinite" - it's called "isinf".
2018-03-07 18:13:26 +01:00

30 lines
583 B
Text

####################
# Validate basic expressions
####################
# Validate how variables in an expression are handled
####################
# Validate math error reporting
math: Error: Too few arguments
'2 - '
^
math: Error: Too few arguments
'ncr(1)'
^
math: Error: Expression is bogus
'max()'
^
math: Error: Too few arguments
'sin()'
^
math: Error: Too many arguments
'2 + 2 4'
^
math: Expected at least 1 args, got only 0
math: Expected at least 1 args, got only 0
math: Error: Result is too large
'2^650'
math: Error: Result is infinite
'1 / 0'