From 20af969aba2c79418c92ae1ae4959f5d6d8829ef Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Mon, 26 Feb 2018 11:25:35 +0100 Subject: [PATCH] [math] Adjust tests for new error reporting This shows how it's still weird - "2 - " and "max()" return the same error. --- tests/math.err | 16 ++++++++++++---- tests/math.in | 6 +++--- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/tests/math.err b/tests/math.err index 212b31850..8282dedae 100644 --- a/tests/math.err +++ b/tests/math.err @@ -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()' + ^ diff --git a/tests/math.in b/tests/math.in index 8fa48595f..e3d92c212 100644 --- a/tests/math.in +++ b/tests/math.in @@ -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()'