]> git.ipfire.org Git - thirdparty/bash.git/blob - tests/quote2.sub
bash-5.1 distribution sources and documentation
[thirdparty/bash.git] / tests / quote2.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 x=x
15 e=
16
17 recho ${x:+""}
18 recho ${x:+ ""}
19 recho ${x:+"" }
20 recho ${x:+"$e"}
21 recho ${x:+ "$e"}
22 recho ${x:+"$e""$e"""}
23 recho ${x:+"$e""$e"""}
24 recho ${x:+"$e" "$e"""}
25 recho ${x:+"$e""$e" ""}
26 recho ${x:+ "$e""$e"""}
27
28 echo =====
29 recho ${x:+''}
30 recho ${x:+ ''}
31 recho ${x:+'' }
32 recho ${x:+'' ''}
33
34 recho ${x:+$e''}
35 recho ${x:+''$e}
36
37 recho ${x:+''$e $e''}
38
39 echo =====
40 recho ${x:+"$(:)"}
41 recho ${x:+ "$(:)"}
42 recho ${x:+"$(:)""$(:)"""}
43 recho ${x:+"$(:)""$(:)"""}
44 recho ${x:+"$(:)" "$(:)"""}
45 recho ${x:+"$(:)""$(:)" ""}
46 recho ${x:+ "$(:)""$(:)"""}
47
48 echo =====
49 recho ${x:+"`:`"}
50 recho ${x:+ "`:`"}
51 recho ${x:+"`:`""`:`"""}
52 recho ${x:+"`:`""`:`"""}
53 recho ${x:+"`:`" "`:`"""}
54 recho ${x:+"`:`""`:`" ""}
55 recho ${x:+ "`:`""`:`"""}