X-Git-Url: https://git.exim.org/users/jgh/exim.git/blobdiff_plain/f90d018c03bbf7d8ac2cd50d33b47bdd7a4bcdf1..d6a96edc044b5876b32787374618e44c37e40423:/test/scripts/0000-Basic/0002 diff --git a/test/scripts/0000-Basic/0002 b/test/scripts/0000-Basic/0002 index 7ff379c4f..760ffb358 100644 --- a/test/scripts/0000-Basic/0002 +++ b/test/scripts/0000-Basic/0002 @@ -67,6 +67,20 @@ eval: ${eval:077} eval: ${eval:08} eval10: ${eval10:077} eval10: ${eval10:08} +eval10: ${eval10:0x1234} +eval: ${eval:2+42%5} +eval: ${eval:0xc&5} +eval: ${eval:0xc & 5 } +eval: ${eval:0x0c|5} +eval: ${eval:0xc^5} +eval: ${eval:0xc>>1} +eval: ${eval:0xc >> 2} +eval: ${eval:0xc >> 4 } +eval: ${eval:0xc<<1} +eval: ${eval:~255&0x1234} +eval: ${eval:~ 255&0x1234} +eval: ${eval: -(~255&0x1234)} + expand: \$primary_hostname ${expand:\$primary_hostname} hash: ${hash_3:monty} ${hash_5:monty} ${hash_4_62:monty python} hash: ${hash_3:abc}X ${hash_3:ab}X ${hash_3:a}X ${hash_3:}X @@ -187,6 +201,11 @@ hash: ${if eq {1}{2}{${hash_3:invalid}}{NO}} md5: ${if eq {1}{2}{${md5:invalid}}{NO}} mask: ${if eq {1}{2}{${mask:invalid}}{NO}} +# Numeric overflow + +4096M ${if >{1}{4096M}{y}{n}} +4096000000 ${if >{1}{4096000000}{y}{n}} + # Conditions 2=2: ${if ={2}{2}{y}{n}} @@ -200,6 +219,7 @@ mask: ${if eq {1}{2}{${mask:invalid}}{NO}} 2>3: ${if >{2}{3}{y}{n}} 3>3: ${if >{3}{3}{y}{n}} 4>3: ${if >{4}{3}{y}{n}} +1>-1: ${if >{1}{-1}{y}{n}} 2>=3: ${if >={2}{3}{y}{n}} 3>=3: ${if >={3}{3}{y}{n}} 4>=3: ${if >={4}{3}{y}{n}} @@ -210,6 +230,7 @@ mask: ${if eq {1}{2}{${mask:invalid}}{NO}} 3<=3: ${if <={3}{3}{y}{n}} 4<=3: ${if <={4}{3}{y}{n}} 5<=3: ${if <={ 5 } { 3 } {y}{n}} +-3<=1: ${if <={-3}{1}{y}{n}} 5>3k: ${if >{5 } {3k }{y}{n}} 5>3m: ${if >{5 } {3m }{y}{n}} @@ -387,6 +408,13 @@ a99b: ${lookup{a99b}nwildlsearch{DIR/aux-var/0002.wild}{$value}{NO}} a\\:b: ${lookup{a\\:b}nwildlsearch{DIR/aux-var/0002.wild}} a\\:Xb: ${lookup{a\\:Xb}nwildlsearch{DIR/aux-var/0002.wild}} +# Some tests of case-(in)dependence + +MiXeD-CD: ${lookup{MiXeD-CD}nwildlsearch{DIR/aux-var/0002.wild}{$value}{NOT FOUND}} +MixeD-CD: ${lookup{MixeD-CD}nwildlsearch{DIR/aux-var/0002.wild}{$value}{NOT FOUND}} +MiXeD-Ncd: ${lookup{MiXeD-Ncd}nwildlsearch{DIR/aux-var/0002.wild}{$value}{NOT FOUND}} +MixeD-Ncd: ${lookup{MixeD-Ncd}nwildlsearch{DIR/aux-var/0002.wild}{$value}{NOT FOUND}} + # IP address (CIDR) lookups 1.2.3.4: ${lookup{1.2.3.4}iplsearch{DIR/aux-fixed/0002.iplsearch}} @@ -564,6 +592,8 @@ ${if and {xyz}{a}{b}} ${if and {{xya}}{a}{b}} ${if and {{${lookup{x}lsearch{/a/b}}}}{a}{b}} ${if eq {$h_xyz}{1}{y}{n}} +${if eq {$h_xyz:}{1}{y}{n} +${if def:h_xyz}{y}{n}} ${if or {eq {}{}{yes}{no}} ${if or {{eq {}{}{yes}{no}} ${if or {{eq {}{}}{yes}{no}}