Re: [PATCH 3/4 v2] Add tests for .git file
Lars Hjemli <hjemli@gmail.com> writes:
Show 30 quoted lines
> Verify that the basic plumbing works when .git is a file pointing at
> the real git directory.
>
> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
> ---
>
> This updated patch replaces cut with sed and tries to do proper quoting.
>
>
> t/t0002-gitfile.sh | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 74 insertions(+), 0 deletions(-)
> create mode 100755 t/t0002-gitfile.sh
>
> diff --git a/t/t0002-gitfile.sh b/t/t0002-gitfile.sh
> new file mode 100755
> index 0000000..7f8ee2f
> --- /dev/null
> +++ b/t/t0002-gitfile.sh
> @@ -0,0 +1,74 @@
> +#!/bin/sh
> +
> +test_description='.git file
> +
> +Verify that plumbing commands work when .git is a file
> +'
> +. ./test-lib.sh
> +
> +objpath() {
> + echo $1 | sed -re 's|(..)(.+)|\1/\2|'
> +}"sed -r"??? Please limit ourselves to the basics.
Show 9 quoted lines
> +test_expect_success 'check commit-tree' '
> + SHA=$(echo "commit bar" | git commit-tree $SHA) &&
> + objck $SHA
> +'
> +
> +test_expect_success 'check rev-list' '
> + echo $SHA >"$REAL/HEAD" &&
> + test "$SHA" = "$(git rev-list HEAD)"
> +'