Lines Matching refs:string
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"
297 unset i pattern string
298 string=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghigklmnopqrstuvwxyz
300 for((i=0; i < ${#string}; i++))
303 [[ $(string=$string $SHELL -c ": \${string/$pattern/}; print \${.sh.match[26]}") == Z ]] || err_exit -u2 'sh.match[26] not Z'
304 : ${string/$pattern/}
508 string='foo(d:\nt\box\something)bar'
510 [[ ${string/*\(+([!\)])\)*/\1} == "$expected" ]] || err_exit "substring expansion failed '${string/*\(+([!\)])\)*/\1}' returned -- '$expected' expected"