Bash-4.3 distribution sources and documentation
[platform/upstream/bash.git] / tests / nquote2.sub
1 t() {
2     printf '%s  |  %s\n' "$1" "$2"
3   }
4   v="'"       # v <- '
5
6   #--
7   t "${v/$'\''/$'\''}"        "'"
8   t  ${v/$'\''/$'\''}         "'"
9   t "${v/$'\''/x}"            "x"
10   t  ${v/$'\''/x}             "x"
11   t "${v/x/$'\''}"            "'"
12   t  ${v/x/$'\''}             "'"
13   t "${v/x/$'\x5c\''}"        "'" 
14   t  ${v/x/$'\x5c\''}         "'" 
15   t "${v/\'/\'}"              "'"
16   t  ${v/\'/\'}               "'"
17   t  ${v/\'/x}               "x"
18
19 echo "'"
20 echo "$'\''"
21
22 echo $'\''
23
24 echo $'\'abcd\''
25 echo "$'\'abcd\''"
26
27 v=1
28 echo ${v/1/\'}
29 echo ${v/\'/2}