diff options
author | Andreas Schneider <asn@samba.org> | 2017-03-13 17:30:37 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2017-03-15 05:26:17 +0100 |
commit | acad0adc2977ca26df44e5b22d8b8e991177af71 (patch) | |
tree | d91a7d5783e103b576d68e24ee2b7c7bb12fbf53 /testprogs | |
parent | 1115f152de9ec25bc9e5e499874b4a7c92c888c0 (diff) | |
download | samba-acad0adc2977ca26df44e5b22d8b8e991177af71.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
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=$? |