t5601-clone.sh failures

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

t5601-clone.sh failures

Armin Kunaschik
Hi list,

eight t5601 tests don't run with my version of sed.
The reason is a trailing space in the sed expression. See below:

#IPv6
for tuah in ::1 [::1] [::1]: user@::1 user@[::1] user@[::1]:
[user@::1] [user@::1]:
do
        ehost=$(echo $tuah | sed -e "s/1]:/1]/ "| tr -d "[]")
        test_expect_success "clone ssh://$tuah/home/user/repo" "
          test_clone_url ssh://$tuah/home/user/repo $ehost /home/user/repo
        "
done

I can not imagine a reason why there should be a space character...
The tests run fine here without the space.
When there isn't any reason, the trailing space should be removed.

Armin
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Reply | Threaded
Open this post in threaded view
|

[PATCH v1 1/1] t5601: Remove trailing space in sed expression

Torsten Bögershausen-2
From: Torsten Bögershausen <[hidden email]>

The sed expression for IPv6, "Tested User And Host" or "tuah" used a wrong
sed expression, which doesn't work under all versions of sed.

Reported-By: Armin Kunaschik <[hidden email]>
Signed-off-by: Torsten Bögershausen <[hidden email]>
---
 t/t5601-clone.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
index 150aeaf..a433394 100755
--- a/t/t5601-clone.sh
+++ b/t/t5601-clone.sh
@@ -466,7 +466,7 @@ test_expect_success 'clone ssh://host.xz:22/~repo' '
 #IPv6
 for tuah in ::1 [::1] [::1]: user@::1 user@[::1] user@[::1]: [user@::1] [user@::1]:
 do
- ehost=$(echo $tuah | sed -e "s/1]:/1]/ "| tr -d "[]")
+ ehost=$(echo $tuah | sed -e "s/1]:/1]/" | tr -d "[]")
  test_expect_success "clone ssh://$tuah/home/user/repo" "
   test_clone_url ssh://$tuah/home/user/repo $ehost /home/user/repo
  "
--
2.0.0.rc1.6318.g0c2c796

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH v1 1/1] t5601: Remove trailing space in sed expression

Junio C Hamano
[hidden email] writes:

> From: Torsten Bögershausen <[hidden email]>
>
> The sed expression for IPv6, "Tested User And Host" or "tuah" used a wrong
> sed expression, which doesn't work under all versions of sed.
>
> Reported-By: Armin Kunaschik <[hidden email]>
> Signed-off-by: Torsten Bögershausen <[hidden email]>
> ---

Good.  Thanks.

>  t/t5601-clone.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
> index 150aeaf..a433394 100755
> --- a/t/t5601-clone.sh
> +++ b/t/t5601-clone.sh
> @@ -466,7 +466,7 @@ test_expect_success 'clone ssh://host.xz:22/~repo' '
>  #IPv6
>  for tuah in ::1 [::1] [::1]: user@::1 user@[::1] user@[::1]: [user@::1] [user@::1]:
>  do
> - ehost=$(echo $tuah | sed -e "s/1]:/1]/ "| tr -d "[]")
> + ehost=$(echo $tuah | sed -e "s/1]:/1]/" | tr -d "[]")
>   test_expect_success "clone ssh://$tuah/home/user/repo" "
>    test_clone_url ssh://$tuah/home/user/repo $ehost /home/user/repo
>   "
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html