3
0

var_bash5.tests 459 B

1234567891011121314151617181920212223242526272829
  1. # This testcase checks whether slashes in ${v/a/b} are parsed before
  2. # or after expansions
  3. v='a/b/c'
  4. s='b/c'
  5. r='e/f'
  6. echo "1 ${v/$s}"
  7. echo "2 ${v/$s/d}"
  8. echo "3 ${v/$s/$r}"
  9. v='a\b\c'
  10. s='b\\c'
  11. r='e\f'
  12. echo "4 ${v/$s}"
  13. echo "5 ${v/$s/d}"
  14. echo "6 ${v/$s/$r}"
  15. v='a\\b\\c'
  16. s='b\\\\c'
  17. r='e\\f'
  18. echo "7 ${v/$s}"
  19. echo "8 ${v/$s/d}"
  20. echo "9 ${v/$s/$r}"
  21. v='a-$a-\t-\\-\"-\`-\--\z-\*-\?-b'
  22. s='-$a-\\t-\\\\-\\"-\\`-\\--\\z-\\\*-\\\?-'
  23. echo "a ${v/$s}"
  24. echo Done: $?