Re: [PATCH v3 01/12] t7300: add testcases showing failure to clean specified pathspecs

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

 



Elijah Newren <newren@xxxxxxxxx> writes:

> +test_expect_failure 'git clean handles being told what to clean' '
> +	mkdir -p d1 d2 &&
> +	touch d1/ut d2/ut &&
> +	git clean -f */ut &&
> +	test_path_is_missing d1/ut &&
> +	test_path_is_missing d2/ut
> +'

Looks like d1 and d2 are new directories and the paths we see in the
test are the only ones that are involved (i.e. we do not rely on any
leftover cruft in d[12]/ from previous tests).  If so, perhaps it is
easier to follow by starting the tests with "rm -fr d1 d2 &&" or
something to assure the readers of the script (not this patch, but
the resulting file down the road) about the isolation?  The same
comment applies to the remainder.

Also, you talked about tracked paths in the proposed log message; do
they not participate in reproducing the issue(s)?

Thanks.


> +test_expect_failure 'git clean handles being told what to clean, with -d' '
> +	mkdir -p d1 d2 &&
> +	touch d1/ut d2/ut &&
> +	git clean -ffd */ut &&
> +	test_path_is_missing d1/ut &&
> +	test_path_is_missing d2/ut
> +'
> +
> +test_expect_failure 'git clean works if a glob is passed without -d' '
> +	mkdir -p d1 d2 &&
> +	touch d1/ut d2/ut &&
> +	git clean -f "*ut" &&
> +	test_path_is_missing d1/ut &&
> +	test_path_is_missing d2/ut
> +'
> +
> +test_expect_failure 'git clean works if a glob is passed with -d' '
> +	mkdir -p d1 d2 &&
> +	touch d1/ut d2/ut &&
> +	git clean -ffd "*ut" &&
> +	test_path_is_missing d1/ut &&
> +	test_path_is_missing d2/ut
> +'
> +
>  test_expect_success MINGW 'handle clean & core.longpaths = false nicely' '
>  	test_config core.longpaths false &&
>  	a50=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &&



[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