3
0

dollar_altvalue2.tests 427 B

123456789101112131415161718192021222324252627282930313233
  1. f() { echo start:; for i; do echo "|$i|"; done; echo end; }
  2. x=a
  3. echo "Unquoted '':"
  4. f ${x:+''}
  5. f ${x:+'' }
  6. f ${x:+ ''}
  7. f ${x:+ '' }
  8. f ${x:+'' ''}
  9. echo
  10. echo 'Unquoted "":'
  11. f ${x:+""}
  12. f ${x:+"" }
  13. f ${x:+ ""}
  14. f ${x:+ "" }
  15. f ${x:+"" ""}
  16. echo
  17. echo "Quoted '':"
  18. f "${x:+''}"
  19. f "${x:+'' }"
  20. f "${x:+ ''}"
  21. f "${x:+ '' }"
  22. f "${x:+'' ''}"
  23. echo
  24. echo 'Quoted "":'
  25. f "${x:+""}"
  26. f "${x:+"" }"
  27. f "${x:+ ""}"
  28. f "${x:+ "" }"
  29. f "${x:+"" ""}"