* [PATCH] test-lib-functions.sh: fix the second argument to some helper functions
@ 2015-04-16 14:12 Elia Pinto
2015-04-16 14:38 ` Matthieu Moy
0 siblings, 1 reply; 4+ messages in thread
From: Elia Pinto @ 2015-04-16 14:12 UTC (permalink / raw)
To: git; +Cc: Matthieu.Moy, Elia Pinto
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>
---
t/test-lib-functions.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index 0698ce7..8f8858a 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -478,7 +478,7 @@ test_external_without_stderr () {
test_path_is_file () {
if ! test -f "$1"
then
- echo "File $1 doesn't exist. $*"
+ echo "File $1 doesn't exist. $2"
false
fi
}
@@ -486,7 +486,7 @@ test_path_is_file () {
test_path_is_dir () {
if ! test -d "$1"
then
- echo "Directory $1 doesn't exist. $*"
+ echo "Directory $1 doesn't exist. $2"
false
fi
}
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] test-lib-functions.sh: fix the second argument to some helper functions
2015-04-16 14:12 [PATCH] test-lib-functions.sh: fix the second argument to some helper functions Elia Pinto
@ 2015-04-16 14:38 ` Matthieu Moy
2015-04-16 20:31 ` Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: Matthieu Moy @ 2015-04-16 14:38 UTC (permalink / raw)
To: Elia Pinto; +Cc: git
Elia Pinto <gitter.spiros@gmail.com> writes:
> --- a/t/test-lib-functions.sh
> +++ b/t/test-lib-functions.sh
> @@ -478,7 +478,7 @@ test_external_without_stderr () {
> test_path_is_file () {
> if ! test -f "$1"
> then
> - echo "File $1 doesn't exist. $*"
> + echo "File $1 doesn't exist. $2"
> false
> fi
> }
> @@ -486,7 +486,7 @@ test_path_is_file () {
> test_path_is_dir () {
> if ! test -d "$1"
> then
> - echo "Directory $1 doesn't exist. $*"
> + echo "Directory $1 doesn't exist. $2"
> false
> fi
> }
Sounds straightforwardly correct to me.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] test-lib-functions.sh: fix the second argument to some helper functions
2015-04-16 14:38 ` Matthieu Moy
@ 2015-04-16 20:31 ` Junio C Hamano
2015-04-20 11:03 ` Matthieu Moy
0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2015-04-16 20:31 UTC (permalink / raw)
To: Matthieu Moy; +Cc: Elia Pinto, git
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
> Elia Pinto <gitter.spiros@gmail.com> writes:
>
>> --- a/t/test-lib-functions.sh
>> +++ b/t/test-lib-functions.sh
>> @@ -478,7 +478,7 @@ test_external_without_stderr () {
>> test_path_is_file () {
>> if ! test -f "$1"
>> then
>> - echo "File $1 doesn't exist. $*"
>> + echo "File $1 doesn't exist. $2"
>> false
>> fi
>> }
>> @@ -486,7 +486,7 @@ test_path_is_file () {
>> test_path_is_dir () {
>> if ! test -d "$1"
>> then
>> - echo "Directory $1 doesn't exist. $*"
>> + echo "Directory $1 doesn't exist. $2"
>> false
>> fi
>> }
>
> Sounds straightforwardly correct to me.
Thanks. This however makes me wonder why you were nominated for
reviewing this patch, though...
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] test-lib-functions.sh: fix the second argument to some helper functions
2015-04-16 20:31 ` Junio C Hamano
@ 2015-04-20 11:03 ` Matthieu Moy
0 siblings, 0 replies; 4+ messages in thread
From: Matthieu Moy @ 2015-04-20 11:03 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Elia Pinto, git
Junio C Hamano <gitster@pobox.com> writes:
> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
>
>> Elia Pinto <gitter.spiros@gmail.com> writes:
>>
>>> --- a/t/test-lib-functions.sh
>>> +++ b/t/test-lib-functions.sh
>>> @@ -478,7 +478,7 @@ test_external_without_stderr () {
>>> test_path_is_file () {
>>> if ! test -f "$1"
>>> then
>>> - echo "File $1 doesn't exist. $*"
>>> + echo "File $1 doesn't exist. $2"
>>> false
>>> fi
>>> }
>>> @@ -486,7 +486,7 @@ test_path_is_file () {
>>> test_path_is_dir () {
>>> if ! test -d "$1"
>>> then
>>> - echo "Directory $1 doesn't exist. $*"
>>> + echo "Directory $1 doesn't exist. $2"
>>> false
>>> fi
>>> }
>>
>> Sounds straightforwardly correct to me.
>
> Thanks. This however makes me wonder why you were nominated for
> reviewing this patch, though...
It seems I'm the one who introduced the bug indeed, in 2caf20c52b7f6.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-04-20 11:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-16 14:12 [PATCH] test-lib-functions.sh: fix the second argument to some helper functions Elia Pinto
2015-04-16 14:38 ` Matthieu Moy
2015-04-16 20:31 ` Junio C Hamano
2015-04-20 11:03 ` Matthieu Moy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).