Skip to content

Commit

Permalink
test-lib-functions.sh: fix the second argument to some helper functions
Browse files Browse the repository at this point in the history
The second argument to test_path_is_file and test_path_is_dir
must be $2 and not $*, which instead would repeat the file
name in the error message.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
Reviewed-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Elia Pinto authored and Junio C Hamano committed Apr 16, 2015
1 parent 12a29b1 commit de248e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions t/test-lib-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -383,15 +383,15 @@ test_external_without_stderr () {
test_path_is_file () {
if ! [ -f "$1" ]
then
echo "File $1 doesn't exist. $*"
echo "File $1 doesn't exist. $2"
false
fi
}

test_path_is_dir () {
if ! [ -d "$1" ]
then
echo "Directory $1 doesn't exist. $*"
echo "Directory $1 doesn't exist. $2"
false
fi
}
Expand Down

0 comments on commit de248e9

Please sign in to comment.