Re: [PATCH v6 4/6] t0060: Add tests for prefix_path when path begins with work tree

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

 



On 2014-02-04 15.25, Martin Erik Werner wrote:

>  t/t0060-path-utils.sh | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh
> index b8e92e1..c0a14f6 100755
> --- a/t/t0060-path-utils.sh
> +++ b/t/t0060-path-utils.sh
> @@ -201,6 +201,16 @@ test_expect_success 'prefix_path works with only absolute path to work tree' '
>  	test_cmp expected actual
>  '
>  
> +test_expect_success 'prefix_path rejects absolute path to dir with same beginning as work tree' '
> +	test_must_fail test-path-utils prefix_path prefix "$(pwd)a"
> +'
> +
> +test_expect_success 'prefix_path works with absolute path to a symlink to work tree having  same beginning as work tree' '
> +	git init repo &&
> +	ln -s repo repolink &&
> +	test "a" = "$(cd repo && test-path-utils prefix_path prefix "$(pwd)/../repolink/a")"
> +'
I think we need SYMLINKS here.

--
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]