X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/44b6e099b76f403a55e77650821f8a69e9d2682e..b8e078953178c757578f2e104d9d2c822ae0943c:/test/scripts/0000-Basic/0002 diff --git a/test/scripts/0000-Basic/0002 b/test/scripts/0000-Basic/0002 index 5ddc9b678..c1fa1bdb5 100644 --- a/test/scripts/0000-Basic/0002 +++ b/test/scripts/0000-Basic/0002 @@ -206,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}> @@ -444,6 +458,7 @@ ge: ${if ge{ABC}{abc}{y}{n}} gei: ${if gei{ABC}{abc}{y}{n}} isip: ${if isip {1.2.3.4}{y}{n}} 1.2.3.4 +isip: ${if isip {1.2.3}{y}{n}} 1.2.3 isip4: ${if isip4{1.2.3.4}{y}{n}} 1.2.3.4 isip6: ${if isip6{1.2.3.4}{y}{n}} 1.2.3.4 isip: ${if isip {::1.2.3.256}{y}{n}} ::1.2.3.256 @@ -461,6 +476,9 @@ isip: ${if isip {fe80::1.2.3.4}{y}{n}} fe80::1.2.3.4 isip: ${if isip {rhubarb}{y}{n}} rhubarb isip4: ${if isip4{rhubarb}{y}{n}} rhubarb isip6: ${if isip6{rhubarb}{y}{n}} rhubarb +isip6: ${if isip6{::/100}{y}{n}} ::/100 +isip6: ${if isip6{::/foo}{y}{n}} ::/foo +isip6: ${if isip6{::/f o}{y}{n}} ::/f o match: ${if match{abcd}{\N^([ab]+)(\w+)$\N}{$2$1}fail} match: ${if match{abcd}{^\N([ab]+)(\w+)$\N}{$2$1}fail} @@ -700,6 +718,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 @@ -968,6 +987,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}}