Documentation/Tests for CVE-2014-2972 fix
[exim.git] / test / scripts / 0000-Basic / 0002
index 1ea5c4a48ae783613af70985d3e8b2ab318c1ad5..51dc6ae48661185680e54f259f073a5699bca74d 100644 (file)
@@ -75,6 +75,13 @@ listcount: ${listcount:}
 listcount: ${listcount:<;a;b;c}
 listcount: ${listcount:${listnamed:dlist}}
 
+listextract: ${listextract{ 2}{a:b:c:d}}
+listextract: ${listextract{-2}{<,a,b,c,d}{X${value}X}}
+listextract: ${listextract{ 5}{a:b:c:d}}
+listextract: ${listextract{-5}{a:b:c:d}}
+listextract: ${listextract{ 5}{a:b:c:d}{}{fail}}
+listextract: ${listextract{ 5}{a:b:c:d}{}fail}
+
 # Tests with iscntrl() and illegal separators
 
 map: ${map{<\n a\n\nb\nc}{'$item'}}
@@ -287,10 +294,12 @@ mask:   ${if eq {1}{2}{${mask:invalid}}{NO}}
 # Numeric overflow
 # >32b should work, >64b not
 
-4096M      ${if >{1}{4096M}{y}{n}}
-4096000000 ${if >{1}{4096000000}{y}{n}}
-4611686018427387904  ${if >{1}{4611686018427387904} {y}{n}}
-46116860184273879040 ${if >{1}{46116860184273879040}{y}{n}}
+1 > 2047M                ${if >{1}{2047M}{y}{n}}
+1 > 2048M                ${if >{1}{2048M}{y}{n}}
+1 > 4096000000           ${if >{1}{4096000000}{y}{n}}
+1 > 4096M                ${if >{1}{4096M}{y}{n}}
+1 > 4611686018427387904  ${if >{1}{4611686018427387904} {y}{n}}
+1 > 46116860184273879040 ${if >{1}{46116860184273879040}{y}{n}}
 
 # Conditions
 
@@ -322,6 +331,7 @@ mask:   ${if eq {1}{2}{${mask:invalid}}{NO}}
 5>3m:   ${if >{5 } {3m }{y}{n}}
 5>3z:   ${if >{5 } {3z }{y}{n}}
 5>a:    ${if >{ 5 } {a}{y}{n}}
+5>bad:  ${if >{5 } {${lookup{trick}lsearch{DIR/aux-fixed/0002.lsearch}}} {y}{n}}
 
 >0:     ${if > {}{0}{y}{n}}
 =:      ${if = {}{}{y}{n}}
@@ -593,7 +603,7 @@ abcdea abc z   ${tr{abcdea}{abc}{z}}
 " yes"                ${if bool{ yes}{true}{false}}      EXPECT: true
 " no"                 ${if bool{ no}{true}{false}}     EXPECT: false
 "yes "                ${if bool{yes }{true}{false}}      EXPECT: true
-"-1"                  ${if bool{-1}{true}{false}}     EXPECT: error
+"-1"                  ${if bool{-1}{true}{false}}     EXPECT: true
 "0"                   ${if bool{0}{true}{false}}     EXPECT: false
 "1"                   ${if bool{1}{true}{false}}      EXPECT: true
 " 0 "                 ${if bool{ 0 }{true}{false}}     EXPECT: false
@@ -603,6 +613,7 @@ abcdea abc z   ${tr{abcdea}{abc}{z}}
 " "                   ${if bool{ }{true}{false}}     EXPECT: false
 "text"                ${if bool{text}{true}{false}}     EXPECT: error
 " text"               ${if bool{ text}{true}{false}}     EXPECT: error
+"-text"               ${if bool{-text}{true}{false}}     EXPECT: error
 "text "               ${if bool{text }{true}{false}}     EXPECT: error
 " text "              ${if bool{ text }{true}{false}}     EXPECT: error
 "00"                  ${if bool{00}{true}{false}}     EXPECT: false