312 [[ $(print -r "${subject/${re}/${string}}") != words ]] && err_exit 'string replacement with $string not working with string=\3 using print'
313 [[ ${subject/${re}/"${string}"} != '\3' ]] && err_exit 'string replacement with "$string" not working with string=\3'
314 [[ $(print -r "${subject/${re}/"${string}"}") != '\3' ]] && err_exit 'string replacement with "$string" not working with string=\3 using print'
315 string='\\3'
316 [[ ${subject/${re}/${string}} != '\3' ]] && err_exit 'string replacement with $string not working with string=\\3'
317 [[ ${subject/${re}/"${string}"} != '\\3' ]] && err_exit 'string replacement with "$string" not working with string=\\3'
318 [[ ${subject/${re}/\4} != '\4' ]] && err_exit 'string replacement with \4 not working'
319 [[ ${subject/${re}/'\4'} != '\4' ]] && err_exit 'string replacement with '\4' not working'
320 string='\4'
321 [[ ${subject/${re}/${string}} != '\4' ]] && err_exit 'string replacement with $string not working with string=\4'
322 [[ ${subject/${re}/"${string}"} != '\4' ]] && err_exit 'string replacement with "$string" not working with string=\4'
323 string='&foo'
324 [[ ${subject/${re}/${string}} != '&foo' ]] && err_exit 'string replacement with $string not working with string=&foo'
325 [[ ${subject/${re}/"${string}"} != '&foo' ]] && err_exit 'string replacement with "$string" not working with string=&foo'
326 {
327 x=x
328 x=${x:-`id | sed 's/^[^(]*(\([^)]*\)).*/\1/'`}
329 } 2> /dev/null || err_exit 'skipping over `` failed'
330 [[ $x == x ]] || err_exit 'assignment ${x:=`...`} failed'
331 [[ $($SHELL -c 'print a[') == 'a[' ]] || err_exit "unbalanced '[' in command arg fails"
332 $SHELL -c $'false && (( `wc -l /dev/null | nawk \'{print $1}\'` > 2 )) && true;:' 2> /dev/null || err_exit 'syntax error with ` in arithmetic expression'
333 { $SHELL -c '(( 1`: "{ }"` ))' ;} 2> /dev/null || err_exit 'problem with ` inside (())'
334 varname=foobarx
335 x=`print '"\$'${varname}'"'`
336 [[ $x == '"$foobarx"' ]] || err_exit $'\\$\' not handled correctly inside ``'
337
338 copy1=5 copynum=1
339 foo="`eval echo "$"{copy$copynum"-0}"`"
340 [[ $foo == "$copy1" ]] || err_exit '$"..." not being ignored inside ``'
341
342 exit $((Errors))
|
312 [[ $(print -r "${subject/${re}/${string}}") != words ]] && err_exit 'string replacement with $string not working with string=\3 using print'
313 [[ ${subject/${re}/"${string}"} != '\3' ]] && err_exit 'string replacement with "$string" not working with string=\3'
314 [[ $(print -r "${subject/${re}/"${string}"}") != '\3' ]] && err_exit 'string replacement with "$string" not working with string=\3 using print'
315 string='\\3'
316 [[ ${subject/${re}/${string}} != '\3' ]] && err_exit 'string replacement with $string not working with string=\\3'
317 [[ ${subject/${re}/"${string}"} != '\\3' ]] && err_exit 'string replacement with "$string" not working with string=\\3'
318 [[ ${subject/${re}/\4} != '\4' ]] && err_exit 'string replacement with \4 not working'
319 [[ ${subject/${re}/'\4'} != '\4' ]] && err_exit 'string replacement with '\4' not working'
320 string='\4'
321 [[ ${subject/${re}/${string}} != '\4' ]] && err_exit 'string replacement with $string not working with string=\4'
322 [[ ${subject/${re}/"${string}"} != '\4' ]] && err_exit 'string replacement with "$string" not working with string=\4'
323 string='&foo'
324 [[ ${subject/${re}/${string}} != '&foo' ]] && err_exit 'string replacement with $string not working with string=&foo'
325 [[ ${subject/${re}/"${string}"} != '&foo' ]] && err_exit 'string replacement with "$string" not working with string=&foo'
326 {
327 x=x
328 x=${x:-`id | sed 's/^[^(]*(\([^)]*\)).*/\1/'`}
329 } 2> /dev/null || err_exit 'skipping over `` failed'
330 [[ $x == x ]] || err_exit 'assignment ${x:=`...`} failed'
331 [[ $($SHELL -c 'print a[') == 'a[' ]] || err_exit "unbalanced '[' in command arg fails"
332 $SHELL -c $'false && (( `wc -l /dev/null | /usr/xpg4/bin/awk \'{print $1}\'` > 2 )) && true;:' 2> /dev/null || err_exit 'syntax error with ` in arithmetic expression'
333 { $SHELL -c '(( 1`: "{ }"` ))' ;} 2> /dev/null || err_exit 'problem with ` inside (())'
334 varname=foobarx
335 x=`print '"\$'${varname}'"'`
336 [[ $x == '"$foobarx"' ]] || err_exit $'\\$\' not handled correctly inside ``'
337
338 copy1=5 copynum=1
339 foo="`eval echo "$"{copy$copynum"-0}"`"
340 [[ $foo == "$copy1" ]] || err_exit '$"..." not being ignored inside ``'
341
342 exit $((Errors))
|