From e47376befc6e4a415319e3c29fad9b0ba2bbd8ee Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Wed, 13 Apr 2016 16:36:44 +0100 Subject: Expansions: better error messages for parse errors, and better debug --- test/stdout/0002 | 19 +++++++++++-------- test/stdout/3000 | 4 ++-- 2 files changed, 13 insertions(+), 10 deletions(-) (limited to 'test/stdout') diff --git a/test/stdout/0002 b/test/stdout/0002 index ee1ef9d93..13ef57a45 100644 --- a/test/stdout/0002 +++ b/test/stdout/0002 @@ -95,8 +95,8 @@ > > # Operators > -> Failed: missing or misplaced { or } -> Failed: missing or misplaced { or } +> Failed: Not enough arguments for 'acl' (min is 1) +> Failed: Not enough arguments for 'acl' (min is 1) > Failed: error from acl "a_nosuch" > acl: (0) [] [] > acl: (1) [person@dom.ain] [] @@ -269,9 +269,9 @@ > > # Error forms > -> Failed: missing or misplaced { or } +> Failed: Not enough arguments for 'hash' (min is 2) > Failed: "nonnumber" is not a number (in "hash" expansion) -> Failed: Too many arguments for "hash" (max is 3) +> Failed: Too many arguments for 'hash' (max is 3) > Failed: "-2" is not a positive number (in "substr" expansion) > > # Skipped operators @@ -343,7 +343,8 @@ > Failed: unknown variable "post" after "def:" > def:h_f n > def:h_f n -> Failed: missing or misplaced { or } +> Failed: curly-bracket problem in conditional yes/no parsing: 'yes' part did not start with '{' + remaining string is ':{y}{n}}' > > exists: y > exists: n @@ -578,7 +579,8 @@ > b > > a:b:c -> Failed: missing or misplaced { or } inside "map" item +> Failed: curly-bracket problem in conditional yes/no parsing: did not close with '}' + remaining string is '{bogus_argument}}}}' inside "map" item > > # Translation > @@ -664,7 +666,7 @@ > > # File insertion > -> Failed: missing or misplaced { or } +> Failed: Not enough arguments for 'readfile' (min is 1) > abcde 12345 @@ -750,7 +752,8 @@ xyz > Failed: unknown condition "xya" inside "and{...}" condition > Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition > Failed: missing } at end of string - could be header name not terminated by colon -> Failed: missing or misplaced { or } +> Failed: curly-bracket problem in conditional yes/no parsing: did not close with '}' + remaining string is '' > Failed: missing or misplaced { or } - could be header name not terminated by colon > Failed: each subcondition inside an "or{...}" condition must be in its own {} > Failed: missing } at end of condition inside "or" group diff --git a/test/stdout/3000 b/test/stdout/3000 index ad21103b3..ca7b094e6 100644 --- a/test/stdout/3000 +++ b/test/stdout/3000 @@ -10,9 +10,9 @@ > Failed: syntax error in Exim::expand_string argument: unknown variable name "notexists" at TESTSUITE/aux-fixed/3000.pl line 9. > -> Failed: missing or misplaced { or } +> Failed: Not enough arguments for 'perl' (min is 1) > Subroutine foo called with args: 1 2 3 4 5 6 7 8 -> Failed: Too many arguments for "perl" (max is 9) +> Failed: Too many arguments for 'perl' (max is 9) > > 42 > 30 -- cgit v1.2.3