]> git.ipfire.org Git - thirdparty/bash.git/blob - tests/comsub.tests
Bash-4.3 patch 7
[thirdparty/bash.git] / tests / comsub.tests
1 # command substution parsing tests
2
3 TABSIZE=`grep -v '^[ #]' $CAPS </dev/null | grep -v "^$" | grep -v "^capalias"| grep -v "^infoalias" | wc -l`
4
5 recho `echo ab cd #efg
6 hijkl`
7
8 recho ab$(echo mn; echo op)yz
9
10 a=`echo 'a b c' | sed 's/ /\\
11 /g' | grep 'b'`
12 recho $a
13
14 recho `echo 'a\' b`
15
16 recho `echo '\$' bab`
17
18 recho `echo '\`' ab`
19
20 recho `echo '\\' ab`
21
22 # old-style command substitution parsing compatibility tests -- post bash-3.1
23 recho 'foo \\
24 bar'
25
26 recho 'foo \
27 bar'
28
29 echo `recho sed -e 's/[ :]/\\
30 /g'`
31
32 echo `recho sed -e 's/[ :]/\
33 /g'`
34
35 echo `recho 'foo\\
36 bar'`
37
38 echo `recho 'foo\
39 bar'`
40
41 echo $(recho 'foo\
42 bar')
43
44 ${THIS_SH} ./comsub1.sub