summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2020-07-05 16:32:27 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2020-07-05 17:43:04 +0100
commit5f17d2f09733cc77355841fbf095a95186cc9fe5 (patch)
tree7040c65ccc02b23ef1435a4d8937349a51084324 /test
parent89b1a5980cf39a0f34186a4c91c3b316c7b2f831 (diff)
Support ret-full on lsearch. Bug 2611
Diffstat (limited to 'test')
-rw-r--r--test/scripts/0000-Basic/000254
-rw-r--r--test/stdout/000222
2 files changed, 60 insertions, 16 deletions
diff --git a/test/scripts/0000-Basic/0002 b/test/scripts/0000-Basic/0002
index a8fc0bcb2..4d170ec68 100644
--- a/test/scripts/0000-Basic/0002
+++ b/test/scripts/0000-Basic/0002
@@ -526,28 +526,50 @@ acl if: ${if acl {{a_defer}{argN}{arg2}} {Y:$value}{N:$value}}
# Lookups: DIR is the testing directory. In this test we can only use the
# lookups that are required in all cases.
-${lookup{postmaster}lsearch{DIR/aux-fixed/0002.aliases}{$value}fail}
+${lookup{postmaster}lsearch {DIR/aux-fixed/0002.aliases}{$value}fail}
+${lookup{postmaster}lsearch,ret=full{DIR/aux-fixed/0002.aliases}{$value}fail}
${lookup{x@y}lsearch*@{DIR/aux-fixed/0002.starat}{$value}fail}
-${lookup{x@z}lsearch*{DIR/aux-fixed/0002.starat}{$value}fail}
+${lookup{x@z}lsearch* {DIR/aux-fixed/0002.starat}{$value}fail}
${lookup{x@z}lsearch*@{DIR/aux-fixed/0002.starat}{$value}fail}
${lookup{x@w}lsearch*@{DIR/aux-fixed/0002.starat}{$value}fail}
-${lookup{a.b.c.d}partial-lsearch{DIR/aux-fixed/0002.domains}{$value}fail}
-${lookup{x.y.z}partial-lsearch{DIR/aux-fixed/0002.domains}{$value}{failed x.y.z}}
-${lookup{p.q}partial-lsearch{DIR/aux-fixed/0002.domains}{$value}fail}
-${lookup{o.p.q}partial-lsearch{DIR/aux-fixed/0002.domains}{$value}fail}
-${lookup{m.n.o.p.q}partial-lsearch{DIR/aux-fixed/0002.domains}{$value}fail}
-${lookup{x.y.z}partial1-lsearch{DIR/aux-fixed/0002.domains}{$value}fail}
-${lookup{x.y.z}partial0-lsearch{DIR/aux-fixed/0002.domains}{$value}fail}
-
-q1: ${lookup{abc}lsearch{DIR/aux-fixed/0002.quoted}}
-q2: ${lookup{xyz}lsearch{DIR/aux-fixed/0002.quoted}}
-q3: ${lookup{pqr}lsearch{DIR/aux-fixed/0002.quoted}}
-q4: ${lookup{a:b}lsearch{DIR/aux-fixed/0002.quoted}}
-q5: ${lookup{"quoted"}lsearch{DIR/aux-fixed/0002.quoted}}
+${lookup{x@y}lsearch*@,ret=full {DIR/aux-fixed/0002.starat}{$value}fail}
+${lookup{x@z}lsearch*,ret=full {DIR/aux-fixed/0002.starat}{$value}fail}
+${lookup{x@z}lsearch*@,ret=full {DIR/aux-fixed/0002.starat}{$value}fail}
+${lookup{x@w}lsearch*@,ret=full {DIR/aux-fixed/0002.starat}{$value}fail}
+
+${lookup{a.b.c.d} partial-lsearch {DIR/aux-fixed/0002.domains}{$value}fail}
+${lookup{x.y.z} partial-lsearch {DIR/aux-fixed/0002.domains}{$value}{failed x.y.z}}
+${lookup{p.q} partial-lsearch {DIR/aux-fixed/0002.domains}{$value}fail}
+${lookup{o.p.q} partial-lsearch {DIR/aux-fixed/0002.domains}{$value}fail}
+${lookup{m.n.o.p.q}partial-lsearch {DIR/aux-fixed/0002.domains}{$value}fail}
+${lookup{x.y.z} partial1-lsearch{DIR/aux-fixed/0002.domains}{$value}fail}
+${lookup{x.y.z} partial0-lsearch{DIR/aux-fixed/0002.domains}{$value}fail}
+
+${lookup{a.b.c.d} partial-lsearch,ret=full {DIR/aux-fixed/0002.domains}{$value}fail}
+${lookup{x.y.z} partial-lsearch,ret=full {DIR/aux-fixed/0002.domains}{$value}{failed x.y.z}}
+${lookup{p.q} partial-lsearch,ret=full {DIR/aux-fixed/0002.domains}{$value}fail}
+${lookup{o.p.q} partial-lsearch,ret=full {DIR/aux-fixed/0002.domains}{$value}fail}
+${lookup{m.n.o.p.q}partial-lsearch,ret=full {DIR/aux-fixed/0002.domains}{$value}fail}
+${lookup{x.y.z} partial1-lsearch,ret=full{DIR/aux-fixed/0002.domains}{$value}fail}
+${lookup{x.y.z} partial0-lsearch,ret=full{DIR/aux-fixed/0002.domains}{$value}fail}
+
+q1: ${lookup{abc} lsearch{DIR/aux-fixed/0002.quoted}}
+q2: ${lookup{xyz} lsearch{DIR/aux-fixed/0002.quoted}}
+q3: ${lookup{pqr} lsearch{DIR/aux-fixed/0002.quoted}}
+q4: ${lookup{a:b} lsearch{DIR/aux-fixed/0002.quoted}}
+q5: ${lookup{"quoted"} lsearch{DIR/aux-fixed/0002.quoted}}
q6: ${lookup{white space}lsearch{DIR/aux-fixed/0002.quoted}}
-q7: ${lookup{b\\s}lsearch{DIR/aux-fixed/0002.quoted}}
+q7: ${lookup{b\\s} lsearch{DIR/aux-fixed/0002.quoted}}
+
+q1: ${lookup{abc} lsearch,ret=full{DIR/aux-fixed/0002.quoted}}
+q2: ${lookup{xyz} lsearch,ret=full{DIR/aux-fixed/0002.quoted}}
+q3: ${lookup{pqr} lsearch,ret=full{DIR/aux-fixed/0002.quoted}}
+q4: ${lookup{a:b} lsearch,ret=full{DIR/aux-fixed/0002.quoted}}
+q5: ${lookup{"quoted"} lsearch,ret=full{DIR/aux-fixed/0002.quoted}}
+q6: ${lookup{white space}lsearch,ret=full{DIR/aux-fixed/0002.quoted}}
+q7: ${lookup{b\\s} lsearch,ret=full{DIR/aux-fixed/0002.quoted}}
abc: ${lookup{abc}wildlsearch{DIR/aux-var/0002.wild}}
a.b.c: ${lookup{a.b.c}wildlsearch{DIR/aux-var/0002.wild}}
diff --git a/test/stdout/0002 b/test/stdout/0002
index b8ff36122..d0e8b5d7b 100644
--- a/test/stdout/0002
+++ b/test/stdout/0002
@@ -491,12 +491,18 @@ newline tab\134backslash ~tilde\177DEL\200\201.
> # lookups that are required in all cases.
>
> CALLER
+> postmaster: CALLER
>
> ==X@Y
> ==*
> ==*@Z
> ==*
>
+> x@y ==X@Y
+> * ==*
+> *@z ==*@Z
+> * ==*
+>
> data for a.b.c.d
> failed x.y.z
> data for *.p.q
@@ -505,6 +511,14 @@ newline tab\134backslash ~tilde\177DEL\200\201.
> Failed: "lookup" failed and "fail" requested
> data for *
>
+> a.b.c.d: data for a.b.c.d
+> failed x.y.z
+> *.p.q: data for *.p.q
+> *.p.q: data for *.p.q
+> *.p.q: data for *.p.q
+> Failed: "lookup" failed and "fail" requested
+> *: data for *
+>
> q1: "abc"
> q2: "xyz":
> q3: "pqr" :
@@ -513,6 +527,14 @@ newline tab\134backslash ~tilde\177DEL\200\201.
> q6: "white space"
> q7: "b\\s"
>
+> q1: abc "abc"
+> q2: xyz: "xyz":
+> q3: pqr : "pqr" :
+> q4: a:b "a:b" abc continued data (make sure not key)
+> q5: "quoted" "\"quoted\""
+> q6: white space "white space"
+> q7: b\s "b\\s"
+>
> abc: abc
> a.b.c: *.b.c
> ab.c: *b.c