testprogs: Correctly expand shell parameters
authorAndreas Schneider <asn@samba.org>
Mon, 13 Mar 2017 16:30:37 +0000 (17:30 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 15 Mar 2017 04:26:17 +0000 (05:26 +0100)
commitacad0adc2977ca26df44e5b22d8b8e991177af71
treed91a7d5783e103b576d68e24ee2b7c7bb12fbf53
parent1115f152de9ec25bc9e5e499874b4a7c92c888c0
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
testprogs/blackbox/subunit.sh