From mboxrd@z Thu Jan 1 00:00:00 1970 From: cgit at cryptocrack.de (Lukas Fleischer) Date: Thu, 19 Jan 2012 21:57:18 +0100 Subject: [PATCH 2/2] tests: properly quote more variables In-Reply-To: <1327001055-29027-2-git-send-email-mailings@hupie.com> References: <1327001055-29027-1-git-send-email-mailings@hupie.com> <1327001055-29027-2-git-send-email-mailings@hupie.com> Message-ID: <20120119205718.GB13613@blizzard> On Thu, Jan 19, 2012 at 08:24:15PM +0100, Ferry Huberts wrote: > From: Ferry Huberts > > Signed-off-by: Ferry Huberts > --- > tests/setup.sh | 8 ++++---- > 1 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/tests/setup.sh b/tests/setup.sh > index 3b52de9..c54609c 100755 > --- a/tests/setup.sh > +++ b/tests/setup.sh > @@ -18,11 +18,11 @@ > unset CDPATH > > mkrepo() { > - name=$1 > + name="$1" > count=$2 > dir="$PWD" > test -d "$name" && return > - printf "Creating testrepo %s\n" $name > + printf "Creating testrepo %s\n" "$name" Only this +/-1 line patch is needed - we don't need to quote right-hand side of assignments here (for details, read my reply to the other patch in this series). > mkdir -p "$name" > cd "$name" > git init > @@ -114,8 +114,8 @@ run_test() > bug=1 > shift > fi > - desc=$1 > - script=$2 > + desc="$1" > + script="$2" > test_count=$(expr $test_count + 1) > printf "\ntest %d: name='%s'\n" $test_count "$desc" >>test-output.log > printf "test %d: eval='%s'\n" $test_count "$2" >>test-output.log > -- > 1.7.7.5 > > > _______________________________________________ > cgit mailing list > cgit at hjemli.net > http://hjemli.net/mailman/listinfo/cgit