summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2012-06-10 17:53:01 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2012-06-10 17:53:01 +0100
commit042eb971b8c1af6d257f207d453b30afeed529b8 (patch)
treedb0d7d4b97a26e1a22fb0d14bb6e6dad8c8c5eda /test
parentc9bd3bb9483e076d952cd684c7cc516ae6407ff2 (diff)
Add ${list:name} and ${nlist:string} expansion operators.
Diffstat (limited to 'test')
-rw-r--r--test/confs/00022
-rw-r--r--test/scripts/0000-Basic/000215
-rw-r--r--test/stdout/000215
3 files changed, 32 insertions, 0 deletions
diff --git a/test/confs/0002 b/test/confs/0002
index af680500c..6983fd87f 100644
--- a/test/confs/0002
+++ b/test/confs/0002
@@ -15,6 +15,8 @@ gecos_name = CALLER_NAME
# ----- Main settings -----
domainlist dlist = *.aa.bb : ^\Nxxx(.*)
+domainlist elist = +dlist : ;;
+domainlist flist = <; a ; b;;c ; +elist ; 2001:630:212:8:204::b664 ;
hostlist hlist = V4NET.11.12.13 : iplsearch;DIR/aux-fixed/0002.iplsearch
headers_charset = iso-8859-8
diff --git a/test/scripts/0000-Basic/0002 b/test/scripts/0000-Basic/0002
index 3b485ee97..41e0d0064 100644
--- a/test/scripts/0000-Basic/0002
+++ b/test/scripts/0000-Basic/0002
@@ -60,6 +60,21 @@ 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}}}}
+list: ${list:dlist}
+list: ${list:+dlist}
+list: ${list:hlist}
+list: ${list:elist}
+list: ${list:flist}
+list: ${list:nolist}
+list: ${list_d:dlist}
+list: ${list_d:hlist}
+list: ${list_z:dlist}
+
+nlist: ${nlist:a:b:c}
+nlist: ${nlist:}
+nlist: ${nlist:<;a;b;c}
+nlist: ${nlist:${list:dlist}}
+
# Tests with iscntrl() and illegal separators
map: ${map{<\n a\n\nb\nc}{'$item'}}
diff --git a/test/stdout/0002 b/test/stdout/0002
index 2acfb63ea..a7c876229 100644
--- a/test/stdout/0002
+++ b/test/stdout/0002
@@ -49,6 +49,21 @@
> reduce: 6
> reduce: 9
>
+> list: *.aa.bb : ^\Nxxx(.*)
+> list: *.aa.bb : ^\Nxxx(.*)
+> list: V4NET.11.12.13 : iplsearch;TESTSUITE/aux-fixed/0002.iplsearch
+> list: *.aa.bb : ^\Nxxx(.*) : ;;
+> list: a : b;c : *.aa.bb : ^\Nxxx(.*) : ;; : 2001::630::212::8::204::::b664
+> Failed: "nolist" is not a named list
+> list: *.aa.bb : ^\Nxxx(.*)
+> Failed: "hlist" is not a domain named list
+> Failed: bad suffix on "list" operator
+>
+> nlist: 3
+> nlist: 0
+> nlist: 3
+> nlist: 2
+>
> # Tests with iscntrl() and illegal separators
>
> map: 'a'