Lines Matching refs:pattern
134 while read -r pattern string expected
136 then if [[ $string != $pattern ]]
137 then err_exit "$pattern does not match $string"
139 if [[ ${string##$pattern} != "" ]]
140 then err_exit "\${$string##$pattern} not null"
142 if [ "${string##$pattern}" != '' ]
143 then err_exit "\"\${$string##$pattern}\" not null"
145 if [[ ${string/$pattern} != "" ]]
146 then err_exit "\${$string/$pattern} not null"
148 else if [[ $string == $pattern ]]
149 then err_exit "$pattern matches $string"
258 [[ $var == 'typeset -a .sh.match=((vin vin) )' ]] || err_exit '.sh.match not correct when replacement pattern contains a substring match'
276 [[ ${b//$a/\1} == 123 ]] || err_exit "\${var/pattern} not working with \[ in pattern"
279 [[ ${foo/'('/'(x11-'} == '(x11-win32.i386) ' ]] || err_exit "\${var/pattern} not working with ' in pattern"
280 $SHELL -c $'v=\'$(hello)\'; [[ ${v//\'$(\'/-I\'$(\'} == -I"$v" ]]' 2> /dev/null || err_exit "\${var/pattern} not working with \$( as pattern"
292 [[ "${x%o}(1)" == "fo(1)" ]] || err_exit 'print ${}() treated as pattern'
293 unset i pattern string
297 do pattern+='@(?)'
299 [[ $(string=$string $SHELL -c ": \${string/$pattern/}; print \${.sh.match[26]}") == Z ]] || err_exit -u2 'sh.match[26] not Z'
300 : ${string/$pattern/}
304 D=$';' E=$'\\\\' Q=$'"' S=$'\'' M='nested pattern substitution failed'
496 pattern=00
499 [[ $( print $(( ${var%%$pattern} )) ) == 1 ]] || err_exit "arithmetic with embeddded pattern variables fails"
513 # subject mode pattern result #