diff options
author | Andreas Schneider <asn@samba.org> | 2017-03-13 17:30:37 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2017-03-23 12:58:48 +0100 |
commit | 0abbc3907cdcffccc87757ca0893208fcfb45a72 (patch) | |
tree | 2e6f6a36a85786145ee3c3e07c8220ccd742e548 /testprogs | |
parent | d6c9486eca46819dbd012097af753bff9f74e0af (diff) | |
download | samba-0abbc3907cdcffccc87757ca0893208fcfb45a72.tar.gz |
testprogs: Correctly expand shell parameters
The old behaviour is:
for var in $*
do
echo "$var"
done
And you get this:
$ sh test.sh 1 2 '3 4'
1
2
3
4
Changing it to:
for var in "$@"
do
echo "$var"
done
will correctly expand to:
$ sh test.sh 1 2 '3 4'
1
2
3 4
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Mar 15 05:26:17 CET 2017 on sn-devel-144
(cherry picked from commit acad0adc2977ca26df44e5b22d8b8e991177af71)
Diffstat (limited to 'testprogs')
-rwxr-xr-x | testprogs/blackbox/subunit.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/testprogs/blackbox/subunit.sh b/testprogs/blackbox/subunit.sh index 0791d775d27..5c81ce20a11 100755 --- a/testprogs/blackbox/subunit.sh +++ b/testprogs/blackbox/subunit.sh @@ -78,7 +78,7 @@ subunit_skip_test () { testit () { name="$1" shift - cmdline="$*" + cmdline="$@" subunit_start_test "$name" output=`$cmdline 2>&1` status=$? @@ -93,7 +93,7 @@ testit () { testit_expect_failure () { name="$1" shift - cmdline="$*" + cmdline="$@" subunit_start_test "$name" output=`$cmdline 2>&1` status=$? |