mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-16 01:38:24 +00:00
f60e1549a9
This now reports "TOO_MANY_ARGS" instead of no error (and triggering an assertion). We might want to add a new error type or report the missing operator before, but this is okay for now.
24 lines
416 B
Text
24 lines
416 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'
|
|
^
|