[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:
Fabian Homborg 2018-02-26 11:25:35 +01:00
parent 0d9123ec91
commit 20af969aba
2 changed files with 15 additions and 7 deletions

View file

@ -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()'
^

View file

@ -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()'