mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-31 17:49:45 +08: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
|
@ -7,7 +7,15 @@
|
||||||
|
|
||||||
####################
|
####################
|
||||||
# Validate math error reporting
|
# Validate math error reporting
|
||||||
math: Invalid expression: Too few parameters for function "min" at expression position 5
|
math: Error: Expression is bogus
|
||||||
math: Invalid expression: String value used where a numerical argument is expected.
|
'2 - '
|
||||||
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: 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"
|
math -s1 "-$x * $y"
|
||||||
|
|
||||||
logmsg Validate math error reporting
|
logmsg Validate math error reporting
|
||||||
not math 'min()'
|
not math '2 - '
|
||||||
not math 'min("abc")'
|
not math 'ncr(1)'
|
||||||
not math 'max()'
|
not math 'max()'
|
||||||
not math 'sum()'
|
not math 'sin()'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user