diff options
| author | Chet Ramey <chet.ramey@case.edu> | 2013-08-12 19:18:42 -0400 |
|---|---|---|
| committer | Chet Ramey <chet.ramey@case.edu> | 2013-08-12 19:18:42 -0400 |
| commit | 1442f67c408e60769ff344f9e4c05104e2cef7d0 (patch) | |
| tree | 6c093574f9b9342f172a8d8367aa9a5849cd4d85 /tests/nquote2.sub | |
| parent | 25eee30b53c60c43b155880820d29c84928847ca (diff) | |
| download | bash-4.3-beta.tar.gz | |
bash-4.3-beta overlaybash-4.3-beta
Diffstat (limited to 'tests/nquote2.sub')
| -rw-r--r-- | tests/nquote2.sub | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/nquote2.sub b/tests/nquote2.sub new file mode 100644 index 00000000..d3325f17 --- /dev/null +++ b/tests/nquote2.sub @@ -0,0 +1,29 @@ +t() { + printf '%s | %s\n' "$1" "$2" + } + v="'" # v <- ' + + #-- + t "${v/$'\''/$'\''}" "'" + t ${v/$'\''/$'\''} "'" + t "${v/$'\''/x}" "x" + t ${v/$'\''/x} "x" + t "${v/x/$'\''}" "'" + t ${v/x/$'\''} "'" + t "${v/x/$'\x5c\''}" "'" + t ${v/x/$'\x5c\''} "'" + t "${v/\'/\'}" "'" + t ${v/\'/\'} "'" + t ${v/\'/x} "x" + +echo "'" +echo "$'\''" + +echo $'\'' + +echo $'\'abcd\'' +echo "$'\'abcd\''" + +v=1 +echo ${v/1/\'} +echo ${v/\'/2} |
