summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/confs/00022
-rw-r--r--test/scripts/0000-Basic/00029
-rw-r--r--test/stderr/00026
-rw-r--r--test/stdout/000212
4 files changed, 26 insertions, 3 deletions
diff --git a/test/confs/0002 b/test/confs/0002
index 8662e54d0..af680500c 100644
--- a/test/confs/0002
+++ b/test/confs/0002
@@ -33,7 +33,7 @@ connect0:
accept
connect1:
- deny hosts = partial-lsearch;DIR/aux-fixed/0002.lsearch
+ deny hosts = <\n partial-lsearch;DIR/aux-fixed/0002.lsearch \n 1.2.3.4
connect2:
deny hosts = net-lsearch;DIR/aux-fixed/0002.lsearch
diff --git a/test/scripts/0000-Basic/0002 b/test/scripts/0000-Basic/0002
index 870359eb2..fd332afa4 100644
--- a/test/scripts/0000-Basic/0002
+++ b/test/scripts/0000-Basic/0002
@@ -59,6 +59,15 @@ reduce: ${reduce{a:b:c}{+}{$value$item}}
reduce: ${reduce {<, 1,2,3}{0}{${eval:$value+$item}}}
reduce: ${reduce {3:0:9:4:6}{0}{${if >{$item}{$value}{$item}{$value}}}}
+# Tests with iscntrl() and illegal separators
+
+map: ${map{<\n a\n\nb\nc}{'$item'}}
+
+reduce: ${reduce {<n 1\n2\n3}{0}{${eval:$value+$item}}}
+reduce: ${reduce {<\n 1\n2\n3}{0}{${eval:$value+$item}}}
+reduce: ${reduce { <\n 1\n 2 \n 3 }{0}{${eval:$value+$item}}}
+reduce: ${reduce {<\x7f 1\x7f2\177 3}{0}{${eval:$value+$item}}}
+
# Operators
addrss: ${address:local-part@dom.ain}
diff --git a/test/stderr/0002 b/test/stderr/0002
index 329b4a2be..b052103a0 100644
--- a/test/stderr/0002
+++ b/test/stderr/0002
@@ -154,7 +154,7 @@ host in helo_try_verify_hosts? no (option unset)
host in helo_accept_junk_hosts? no (option unset)
using ACL "connect1"
processing "deny"
-check hosts = partial-lsearch;TESTSUITE/aux-fixed/0002.lsearch
+check hosts = <\n partial-lsearch;TESTSUITE/aux-fixed/0002.lsearch \n 1.2.3.4
sender host name required, to match against partial-lsearch;TESTSUITE/aux-fixed/0002.lsearch
looking up host name for V4NET.0.0.1
DNS lookup of 1.0.0.V4NET.in-addr.arpa (PTR) using fakens
@@ -181,7 +181,9 @@ internal_search_find: file="TESTSUITE/aux-fixed/0002.lsearch"
file lookup required for ten-1.test.ex
in TESTSUITE/aux-fixed/0002.lsearch
lookup yielded:
-host in "partial-lsearch;TESTSUITE/aux-fixed/0002.lsearch"? yes (matched "partial-lsearch;TESTSUITE/aux-fixed/0002.lsearch")
+host in "<
+ partial-lsearch;TESTSUITE/aux-fixed/0002.lsearch
+ 1.2.3.4"? yes (matched "partial-lsearch;TESTSUITE/aux-fixed/0002.lsearch")
deny: condition test succeeded
SMTP>> 550 Administrative prohibition
LOG: MAIN REJECT
diff --git a/test/stdout/0002 b/test/stdout/0002
index d985a9c1e..f76f07f51 100644
--- a/test/stdout/0002
+++ b/test/stdout/0002
@@ -49,6 +49,18 @@
> reduce: 6
> reduce: 9
>
+> # Tests with iscntrl() and illegal separators
+>
+> map: 'a'
+''
+'b'
+'c'
+>
+> Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "0+") inside "reduce" item
+> reduce: 6
+> reduce: 6
+> reduce: 6
+>
> # Operators
>
> addrss: local-part@dom.ain