]> git.ipfire.org Git - thirdparty/bash.git/blob - tests/iquote1.sub
Bash-5.2-rc4 release
[thirdparty/bash.git] / tests / iquote1.sub
1 # This program is free software: you can redistribute it and/or modify
2 # it under the terms of the GNU General Public License as published by
3 # the Free Software Foundation, either version 3 of the License, or
4 # (at your option) any later version.
5 #
6 # This program is distributed in the hope that it will be useful,
7 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 # GNU General Public License for more details.
10 #
11 # You should have received a copy of the GNU General Public License
12 # along with this program. If not, see <http://www.gnu.org/licenses/>.
13 #
14 # Problems with variables that expand to 0x7f and quoted nulls in the same
15 # expansion -- affects bash versions 4.0-post 4.2
16 a=x
17 b=
18 del=$'\x7f'
19
20 set ""
21
22 recho ${undef-"x$*y"}
23 recho "x$*y"
24 recho x"$*"y
25 recho x"$del"y
26
27 recho ${undef-"$@"}
28 recho "$@"
29 recho "${@}"
30 recho ${undef-"$*"}
31 recho "$*"
32 recho "${*}"
33
34 recho "$del${a#x}"
35 recho "$del ${a#x}"
36 recho " $del${a#x}"
37
38 recho " $del$b"
39 recho " $del${b}"
40 recho " $del${b#x}"
41 recho " $del${a#x}"
42
43 recho " $del${a%x}"
44 recho " $del${a:0:0}"
45 recho " $del"${a:0:0}
46 recho " $del""${a:0:0}"
47 recho " $del${a}"
48 recho " $del"
49 recho " ${del}${a:0:0}"
50 recho " ${del:0:1}${a:0:0}"
51 recho " ${del:0:1}${a}"
52 recho "${del:0:1}${a#d}"
53 recho "${del:0:1}${a#x}"
54 recho " ${del:0:1} ${a}"
55 recho "${del:0:1} ${a#d}"
56 recho "${del:0:1} ${a#x}"