mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 23:24:39 +00:00
[math] Adjust tests for new error reporting
This shows how it's still weird - "2 - " and "max()" return the same error.
This commit is contained in:
parent
0d9123ec91
commit
20af969aba
2 changed files with 15 additions and 7 deletions
|
@ -7,7 +7,15 @@
|
|||
|
||||
####################
|
||||
# Validate math error reporting
|
||||
math: Invalid expression: Too few parameters for function "min" at expression position 5
|
||||
math: Invalid expression: String value used where a numerical argument is expected.
|
||||
math: Invalid expression: Too few parameters for function "max" at expression position 5
|
||||
math: Invalid expression: Too few parameters for function "sum" at expression position 5
|
||||
math: Error: Expression is bogus
|
||||
'2 - '
|
||||
^
|
||||
math: Error: Too few arguments
|
||||
'ncr(1)'
|
||||
^
|
||||
math: Error: Expression is bogus
|
||||
'max()'
|
||||
^
|
||||
math: Error: Too few arguments
|
||||
'sin()'
|
||||
^
|
||||
|
|
|
@ -24,7 +24,7 @@ math "-$x * $y"
|
|||
math -s1 "-$x * $y"
|
||||
|
||||
logmsg Validate math error reporting
|
||||
not math 'min()'
|
||||
not math 'min("abc")'
|
||||
not math '2 - '
|
||||
not math 'ncr(1)'
|
||||
not math 'max()'
|
||||
not math 'sum()'
|
||||
not math 'sin()'
|
||||
|
|
Loading…
Reference in a new issue