Re: [PATCH 01/11] Add tests for git cat-file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Adam Roben <aroben@xxxxxxxxx> wrote:
> 
> Signed-off-by: Adam Roben <aroben@xxxxxxxxx>
> ---
>  t/t1006-cat-file.sh |  101 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 101 insertions(+), 0 deletions(-)
>  create mode 100755 t/t1006-cat-file.sh
> 
> diff --git a/t/t1006-cat-file.sh b/t/t1006-cat-file.sh
> new file mode 100755
> index 0000000..15741d9
> --- /dev/null
> +++ b/t/t1006-cat-file.sh
> @@ -0,0 +1,101 @@
> +#!/bin/sh
> +
> +test_description='git cat-file'
> +
> +. ./test-lib.sh
> +
> +function echo_without_newline()

The "function " keyword is a bashism and not needed, this breaks
my test run with dash as /bin/sh (same thing in t1007).

> +{
> +    echo "$@\c"

I guess we have different bash versions/options, because this breaks for
me in bash (3.1dfsg-8 from Debian etch).  It would need -e to handle to
handle escape sequence, but that's a bashism, too.

Use printf "$@" here instead.

So yes, this test was broken in both dash and bash for me without the
above fixes.

-- 
Eric Wong
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux