source: MondoRescue/branches/2.2.9/mindi-busybox/shell/msh_test/msh-vars/var_subst_in_for.tests@ 3320

Last change on this file since 3320 was 3320, checked in by Bruno Cornec, 9 years ago
  • Re-add (thanks git BTW) the 2.2.9 branch which had been destroyed in the move to 3.0
  • Property svn:executable set to *
File size: 814 bytes
Line 
1if test $# = 0; then
2 exec "$THIS_SH" var_subst_in_for.tests abc "d e"
3fi
4
5echo 'Testing: in x y z'
6for a in x y z; do echo ".$a."; done
7
8echo 'Testing: in u $empty v'
9empty=''
10for a in u $empty v; do echo ".$a."; done
11
12echo 'Testing: in u " $empty" v'
13empty=''
14for a in u " $empty" v; do echo ".$a."; done
15
16echo 'Testing: in u $empty $empty$a v'
17a='a'
18for a in u $empty $empty$a v; do echo ".$a."; done
19
20echo 'Testing: in $a_b'
21a_b='a b'
22for a in $a_b; do echo ".$a."; done
23
24echo 'Testing: in $*'
25for a in $*; do echo ".$a."; done
26
27echo 'Testing: in $@'
28for a in $@; do echo ".$a."; done
29
30echo 'Testing: in -$*-'
31for a in -$*-; do echo ".$a."; done
32
33echo 'Testing: in -$@-'
34for a in -$@-; do echo ".$a."; done
35
36echo 'Testing: in $a_b -$a_b-'
37a_b='a b'
38for a in $a_b -$a_b-; do echo ".$a."; done
39
40echo Finished
Note: See TracBrowser for help on using the repository browser.