d481dc32d340c538a09b881030724e9c37f108d6
[platform/upstream/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')