All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
To: Alexey Shumkin <alex.crezoff@gmail.com>, git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] t6006 (rev-list-format): quote format strings to avoid error on some shells
Date: Tue, 20 May 2014 16:03:07 +0100	[thread overview]
Message-ID: <537B6EAB.2070301@ramsay1.demon.co.uk> (raw)
In-Reply-To: <7a4473fce2948c31f561c6002ab0b1d5ab0ee841.1400597264.git.Alex.Crezoff@gmail.com>

On 20/05/14 15:48, Alexey Shumkin wrote:
> Added in 0a144b3 (t4205, t6006: add failing tests for the case when
> i18n.logOutputEncoding is set, 2014-05-19) tests give no error
> (somehow) with Bash as /bin/sh but fail for some other shells.
> 
> Quote format strings to avoid errors.
> 
> Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com>
> Suggested-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
> ---
>  t/t6006-rev-list-format.sh | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh
> index c6e9a73..19434ad 100755
> --- a/t/t6006-rev-list-format.sh
> +++ b/t/t6006-rev-list-format.sh
> @@ -149,7 +149,7 @@ commit $head1
>  $added
>  EOF
>  
> -test_format subject-truncated %<($truncate_count,trunc)%s <<EOF
> +test_format subject-truncated "%<($truncate_count,trunc)%s" <<EOF
>  commit $head2
>  changed (ge${changed_utf8_part}ndert)..
>  commit $head1
> @@ -259,7 +259,7 @@ commit $head1
>  $added_iso88591
>  EOF
>  
> -test_format complex-subject-trunc %<($truncate_count,trunc)%s <<EOF
> +test_format complex-subject-trunc "%<($truncate_count,trunc)%s" <<EOF
>  commit $head3
>  Test printing of c..
>  commit $head2
> @@ -268,7 +268,7 @@ commit $head1
>  added (hinzugef${added_utf8_part_iso88591}gt..
>  EOF
>  
> -test_format complex-subject-mtrunc %<($truncate_count,mtrunc)%s <<EOF
> +test_format complex-subject-mtrunc "%<($truncate_count,mtrunc)%s" <<EOF
>  commit $head3
>  Test prin..ex bodies
>  commit $head2
> @@ -277,7 +277,7 @@ commit $head1
>  added (hi..f${added_utf8_part_iso88591}gt) foo
>  EOF
>  
> -test_format complex-subject-ltrunc %<($truncate_count,ltrunc)%s <<EOF
> +test_format complex-subject-ltrunc "%<($truncate_count,ltrunc)%s" <<EOF
>  commit $head3
>  .. of complex bodies
>  commit $head2
> @@ -314,7 +314,7 @@ commit $head1
>  $added
>  EOF
>  
> -test_format complex-subject-commitencoding-unset-trunc %<($truncate_count,trunc)%s <<EOF
> +test_format complex-subject-commitencoding-unset-trunc "%<($truncate_count,trunc)%s" <<EOF
>  commit $head3
>  Test printing of c..
>  commit $head2
> @@ -323,7 +323,7 @@ commit $head1
>  added (hinzugef${added_utf8_part}gt..
>  EOF
>  
> -test_format complex-subject-commitencoding-unset-mtrunc %<($truncate_count,mtrunc)%s <<EOF
> +test_format complex-subject-commitencoding-unset-mtrunc "%<($truncate_count,mtrunc)%s" <<EOF
>  commit $head3
>  Test prin..ex bodies
>  commit $head2
> @@ -332,7 +332,7 @@ commit $head1
>  added (hi..f${added_utf8_part}gt) foo
>  EOF
>  
> -test_format complex-subject-commitencoding-unset-ltrunc %<($truncate_count,ltrunc)%s <<EOF
> +test_format complex-subject-commitencoding-unset-ltrunc "%<($truncate_count,ltrunc)%s" <<EOF
>  commit $head3
>  .. of complex bodies
>  commit $head2
> 

Yep, actually using string quotes works just as well! :-P

Thanks!

ATB,
Ramsay Jones

  reply	other threads:[~2014-05-20 15:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-20 13:54 [PATCH] t6006-*.sh: Fix truncation tests Ramsay Jones
2014-05-20 14:19 ` Alexey Shumkin
2014-05-20 14:34   ` Alexey Shumkin
2014-05-20 15:01   ` Ramsay Jones
2014-05-20 16:02     ` Alexey Shumkin
2014-05-20 16:43       ` Ramsay Jones
2014-05-20 17:10   ` Junio C Hamano
2014-05-21  4:11     ` Alexey Shumkin
2014-05-20 14:48 ` [PATCH] t6006 (rev-list-format): quote format strings to avoid error on some shells Alexey Shumkin
2014-05-20 15:03   ` Ramsay Jones [this message]
2014-05-21 12:59   ` Alexey Shumkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=537B6EAB.2070301@ramsay1.demon.co.uk \
    --to=ramsay@ramsay1.demon.co.uk \
    --cc=alex.crezoff@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.