busybox/shell/ash_test/ash-quoting/dollar_altvalue2.tests

34 lines
427 B
Plaintext
Raw Permalink Normal View History

f() { echo start:; for i; do echo "|$i|"; done; echo end; }
x=a
echo "Unquoted '':"
f ${x:+''}
f ${x:+'' }
f ${x:+ ''}
f ${x:+ '' }
f ${x:+'' ''}
echo
echo 'Unquoted "":'
f ${x:+""}
f ${x:+"" }
f ${x:+ ""}
f ${x:+ "" }
f ${x:+"" ""}
echo
echo "Quoted '':"
f "${x:+''}"
f "${x:+'' }"
f "${x:+ ''}"
f "${x:+ '' }"
f "${x:+'' ''}"
echo
echo 'Quoted "":'
f "${x:+""}"
f "${x:+"" }"
f "${x:+ ""}"
f "${x:+ "" }"
f "${x:+"" ""}"