X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/c51f713eebe21071f22d0830fdaeb274b1a77059..b015574531cf18b2126edb9da5a99dad659207dd:/test/scripts/0000-Basic/0002?ds=sidebyside diff --git a/test/scripts/0000-Basic/0002 b/test/scripts/0000-Basic/0002 index db3eae6be..b4f2341bb 100644 --- a/test/scripts/0000-Basic/0002 +++ b/test/scripts/0000-Basic/0002 @@ -90,6 +90,8 @@ filter: ${filter{a:b:c}{!eq{$item}{b}}} filter: ${filter{<' a'b'c}{!eq{$item}{b}}} filter: ${filter{<' ''a'b' ''c}{!eq{$item}{b}}} filter: "${filter{}{!eq{$item}{b}}}" +# check operation when the condition modifies the 'value' variable +${filter {E} {inlisti{$item}{ e }}} map: "${map{}{$item}}" map: ${map{a:b:c}{$item}} @@ -204,6 +206,20 @@ hex2b64:${hex2b64:1a2b3c4d5e6g} hex2b64:${hex2b64:${md5:the quick brown fox}} hex2b64:${hex2b64:${sha1:the quick brown fox}} +headerwrap:${headerwrap:} +headerwrap:${headerwrap:a} +headerwrap:${headerwrap:ab} +headerwrap:${headerwrap:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz} +headerwrap_79:${headerwrap_79:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz} +headerwrap:${headerwrap:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab} +headerwrap:${headerwrap:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab} +headerwrap:${headerwrap:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab} +headerwrap:${headerwrap:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbz} +headerwrap:${headerwrap:123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789(100).6789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789(200).6789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789(300).678901234567890123456789012345678901234567890123456789012345678901234567890123456789(400).67890123456789012345678901234567890123456789012345678901234567890123456789012345\ +67890123456789(500).678901234567890123456789012345678901234567890123456789012345678901234567890123456789(600).6789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789(700).6789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789(800).6789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789(900).6789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789(1000).789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789(100).67890123456789} +headerwrap_81_100:${headerwrap_81_100:123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789(100).6789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789(200).6789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789(300).678901234567890123456789012345678901234567890123456789012345678901234567890123456789(400).67890123456789012345678901234567890123456789012345678901234567890123456789012345\ +67890123456789(500).678901234567890123456789012345678901234567890123456789012345678901234567890123456789(600).6789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789(700).6789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789(800).6789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789(900).6789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789(1000).789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789(100).67890123456789} + base32: 0 <${base32:0}> base32: 1 <${base32:1}> base32: 31 <${base32:31}> @@ -249,6 +265,8 @@ mask: ${mask:192.168.10.206/0} mask: ${mask:192.168.10.206} mask: ${mask:a.b.c.d} mask: ${mask:2a00:2:3:4:5:6:7:8/79} +mask: ${mask:2a00:2:3:4:5:6:7:8/128} +mask: ${mask:2a00:2:3:4:5:6:7:8/129} mask_n: ${mask_n:2a00:2:3:4:5:6:7:8/79} ipv6denorm: ${ipv6denorm:::1} ipv6denorm: ${ipv6denorm:fe00::1} @@ -463,6 +481,8 @@ match: ${if match{abcd}{^\N([ab]+)(\w+)$\N}{$2$1}fail} match: ${if match{abcd}{^([ab]+)(\\w+)\$}{$2$1}fail} match: ${if match{wxyz}{^([ab]+)(\\w+)\$}{$2$1}fail} match: ${if match{abcd}{^([ab]+)(\\w+)\$}{$2[${if match{xyz}{(.*)}{$1}fail}]$1}fail} +# check for empty capture group +match: ${if match{abc}{\N^(\S+)\s*(\S.+)*$\N}{<$2>}{}} match_domain: ${if match_domain{a.b.c}{x.y.z:a.b.c:p.q.r}{yes}{no}} match_domain: ${if match_domain{a.b.c}{x.y.z:p.q.r}{yes}{no}} @@ -694,6 +714,7 @@ abcdea aaa xyz ${tr{abcdea}{aaa}{xyz}} abcdea a z ${tr{abcdea}{a}{z}} abcdea a ${tr{abcdea}{a}{}} abcdea abc z ${tr{abcdea}{abc}{z}} +(null) '${sg{$header_foobar:${tr{}{}{foobar}}}{}{}}' # Boolean "TrUe" ${if bool{TrUe}{true}{false}} EXPECT: true @@ -800,6 +821,10 @@ rc=$runrc rc=$runrc ${if eq{1}{2}{${run{/non/exist}}}{1!=2}} rc=$runrc +${run,preexpand {DIR/aux-fixed/0002.runfile 0}} +rc=$runrc +${run{DIR/aux-fixed/0002.runfile ${quote:1}}{$value}{2}} +rc=$runrc # PRVS @@ -958,6 +983,13 @@ expect: <> <${extract jsons{nonexistent}{ \{"id": \{"a":101, "b":102\}, "IDs": \{"1":116, "2":943, "3":234\}\} }}> expect: <> +# string value with embedded comma +<${extract jsons{name}{ \{ "id":"1","name":"Doe, John","age":"unknown" \}}}> +expect +# string value with embedded doublequote +<${extract jsons{name}{ \{ "id":"1","name":"word1 \\\" word2","age":"unknown" \}}}> +expect + ${if forany_json {[1, 2, 3]}{={$item}{1}}{yes}{no}} ${if forany_jsons{["A", "B", "C"]}{eq{$item}{B}}{yes}{no}}