git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [GSOC][PATCH v2 1/1] t7301: use test_path_is_(missing|file)

From
Patrick Steinhardt <ps@pks.im>
Date
Mar 4, 2024, 09:31 UTC
Message-ID
<ZeWVB5uKLONfp6cO@tanuki>
In-Reply-To
<20240227161734.52830-2-vincenzo.mezzela@gmail.com>
On Tue, Feb 27, 2024 at 05:17:34PM +0100, Vincenzo Mezzela wrote:
> Refactor test -(f|e) to utilize the corresponding helper functions from
Nit: you didn't convert any instances of `test -e`, so I'd simplify the
message to just say `test -f` here.
Show 8 quoted lines
> test-lib-functions.sh. These functions perform indentical operations
> while enhancing debugging capabilities in case of test failures.
>   
> In the context of this file, 'test ! -f' is meant to check if the file
> has been correctly cleaned, thus its usage is replaced with
> 'test_path_is_missing' instead of '! test_path_is_file'.
>  
> 

Another nit: There should only be a single empty line between body and trailer lines.

Other than that this patch looks good to me, thanks!
Patrick
Show 650 quoted lines
> Signed-off-by: Vincenzo Mezzela <vincenzo.mezzela@gmail.com>
> ---
>  t/t7301-clean-interactive.sh | 490 +++++++++++++++++------------------
>  1 file changed, 245 insertions(+), 245 deletions()
> 
> diff --git a/t/t7301-clean-interactive.sh b/t/t7301-clean-interactive.sh
> index d82a3210a1..4afe53c66a 100755
> --- a/t/t7301-clean-interactive.sh
> +++ b/t/t7301-clean-interactive.sh
> @@ -25,18 +25,18 @@ test_expect_success 'git clean -i (c: clean hotkey)' '
>  	touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
>  	docs/manual.txt obj.o build/lib.so &&
>  	echo c | git clean -i &&
> -	test -f Makefile &&
> -	test -f README &&
> -	test -f src/part1.c &&
> -	test -f src/part2.c &&
> -	test ! -f a.out &&
> -	test -f docs/manual.txt &&
> -	test ! -f src/part3.c &&
> -	test ! -f src/part3.h &&
> -	test ! -f src/part4.c &&
> -	test ! -f src/part4.h &&
> -	test -f obj.o &&
> -	test -f build/lib.so
> +	test_path_is_file Makefile &&
> +	test_path_is_file README &&
> +	test_path_is_file src/part1.c &&
> +	test_path_is_file src/part2.c &&
> +	test_path_is_missing a.out &&
> +	test_path_is_file docs/manual.txt &&
> +	test_path_is_missing src/part3.c &&
> +	test_path_is_missing src/part3.h &&
> +	test_path_is_missing src/part4.c &&
> +	test_path_is_missing src/part4.h &&
> +	test_path_is_file obj.o &&
> +	test_path_is_file build/lib.so
>  
>  '
>  
> @@ -46,18 +46,18 @@ test_expect_success 'git clean -i (cl: clean prefix)' '
>  	touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
>  	docs/manual.txt obj.o build/lib.so &&
>  	echo cl | git clean -i &&
> -	test -f Makefile &&
> -	test -f README &&
> -	test -f src/part1.c &&
> -	test -f src/part2.c &&
> -	test ! -f a.out &&
> -	test -f docs/manual.txt &&
> -	test ! -f src/part3.c &&
> -	test ! -f src/part3.h &&
> -	test ! -f src/part4.c &&
> -	test ! -f src/part4.h &&
> -	test -f obj.o &&
> -	test -f build/lib.so
> +	test_path_is_file Makefile &&
> +	test_path_is_file README &&
> +	test_path_is_file src/part1.c &&
> +	test_path_is_file src/part2.c &&
> +	test_path_is_missing a.out &&
> +	test_path_is_file docs/manual.txt &&
> +	test_path_is_missing src/part3.c &&
> +	test_path_is_missing src/part3.h &&
> +	test_path_is_missing src/part4.c &&
> +	test_path_is_missing src/part4.h &&
> +	test_path_is_file obj.o &&
> +	test_path_is_file build/lib.so
>  
>  '
>  
> @@ -67,18 +67,18 @@ test_expect_success 'git clean -i (quit)' '
>  	touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
>  	docs/manual.txt obj.o build/lib.so &&
>  	echo quit | git clean -i &&
> -	test -f Makefile &&
> -	test -f README &&
> -	test -f src/part1.c &&
> -	test -f src/part2.c &&
> -	test -f a.out &&
> -	test -f docs/manual.txt &&
> -	test -f src/part3.c &&
> -	test -f src/part3.h &&
> -	test -f src/part4.c &&
> -	test -f src/part4.h &&
> -	test -f obj.o &&
> -	test -f build/lib.so
> +	test_path_is_file Makefile &&
> +	test_path_is_file README &&
> +	test_path_is_file src/part1.c &&
> +	test_path_is_file src/part2.c &&
> +	test_path_is_file a.out &&
> +	test_path_is_file docs/manual.txt &&
> +	test_path_is_file src/part3.c &&
> +	test_path_is_file src/part3.h &&
> +	test_path_is_file src/part4.c &&
> +	test_path_is_file src/part4.h &&
> +	test_path_is_file obj.o &&
> +	test_path_is_file build/lib.so
>  
>  '
>  
> @@ -88,18 +88,18 @@ test_expect_success 'git clean -i (Ctrl+D)' '
>  	touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
>  	docs/manual.txt obj.o build/lib.so &&
>  	echo "\04" | git clean -i &&
> -	test -f Makefile &&
> -	test -f README &&
> -	test -f src/part1.c &&
> -	test -f src/part2.c &&
> -	test -f a.out &&
> -	test -f docs/manual.txt &&
> -	test -f src/part3.c &&
> -	test -f src/part3.h &&
> -	test -f src/part4.c &&
> -	test -f src/part4.h &&
> -	test -f obj.o &&
> -	test -f build/lib.so
> +	test_path_is_file Makefile &&
> +	test_path_is_file README &&
> +	test_path_is_file src/part1.c &&
> +	test_path_is_file src/part2.c &&
> +	test_path_is_file a.out &&
> +	test_path_is_file docs/manual.txt &&
> +	test_path_is_file src/part3.c &&
> +	test_path_is_file src/part3.h &&
> +	test_path_is_file src/part4.c &&
> +	test_path_is_file src/part4.h &&
> +	test_path_is_file obj.o &&
> +	test_path_is_file build/lib.so
>  
>  '
>  
> @@ -110,18 +110,18 @@ test_expect_success 'git clean -id (filter all)' '
>  	docs/manual.txt obj.o build/lib.so &&
>  	test_write_lines f "*" "" c |
>  	git clean -id &&
> -	test -f Makefile &&
> -	test -f README &&
> -	test -f src/part1.c &&
> -	test -f src/part2.c &&
> -	test -f a.out &&
> -	test -f docs/manual.txt &&
> -	test -f src/part3.c &&
> -	test -f src/part3.h &&
> -	test -f src/part4.c &&
> -	test -f src/part4.h &&
> -	test -f obj.o &&
> -	test -f build/lib.so
> +	test_path_is_file Makefile &&
> +	test_path_is_file README &&
> +	test_path_is_file src/part1.c &&
> +	test_path_is_file src/part2.c &&
> +	test_path_is_file a.out &&
> +	test_path_is_file docs/manual.txt &&
> +	test_path_is_file src/part3.c &&
> +	test_path_is_file src/part3.h &&
> +	test_path_is_file src/part4.c &&
> +	test_path_is_file src/part4.h &&
> +	test_path_is_file obj.o &&
> +	test_path_is_file build/lib.so
>  
>  '
>  
> @@ -132,18 +132,18 @@ test_expect_success 'git clean -id (filter patterns)' '
>  	docs/manual.txt obj.o build/lib.so &&
>  	test_write_lines f "part3.* *.out" "" c |
>  	git clean -id &&
> -	test -f Makefile &&
> -	test -f README &&
> -	test -f src/part1.c &&
> -	test -f src/part2.c &&
> -	test -f a.out &&
> -	test ! -f docs/manual.txt &&
> -	test -f src/part3.c &&
> -	test -f src/part3.h &&
> -	test ! -f src/part4.c &&
> -	test ! -f src/part4.h &&
> -	test -f obj.o &&
> -	test -f build/lib.so
> +	test_path_is_file Makefile &&
> +	test_path_is_file README &&
> +	test_path_is_file src/part1.c &&
> +	test_path_is_file src/part2.c &&
> +	test_path_is_file a.out &&
> +	test_path_is_missing docs/manual.txt &&
> +	test_path_is_file src/part3.c &&
> +	test_path_is_file src/part3.h &&
> +	test_path_is_missing src/part4.c &&
> +	test_path_is_missing src/part4.h &&
> +	test_path_is_file obj.o &&
> +	test_path_is_file build/lib.so
>  
>  '
>  
> @@ -154,18 +154,18 @@ test_expect_success 'git clean -id (filter patterns 2)' '
>  	docs/manual.txt obj.o build/lib.so &&
>  	test_write_lines f "* !*.out" "" c |
>  	git clean -id &&
> -	test -f Makefile &&
> -	test -f README &&
> -	test -f src/part1.c &&
> -	test -f src/part2.c &&
> -	test ! -f a.out &&
> -	test -f docs/manual.txt &&
> -	test -f src/part3.c &&
> -	test -f src/part3.h &&
> -	test -f src/part4.c &&
> -	test -f src/part4.h &&
> -	test -f obj.o &&
> -	test -f build/lib.so
> +	test_path_is_file Makefile &&
> +	test_path_is_file README &&
> +	test_path_is_file src/part1.c &&
> +	test_path_is_file src/part2.c &&
> +	test_path_is_missing a.out &&
> +	test_path_is_file docs/manual.txt &&
> +	test_path_is_file src/part3.c &&
> +	test_path_is_file src/part3.h &&
> +	test_path_is_file src/part4.c &&
> +	test_path_is_file src/part4.h &&
> +	test_path_is_file obj.o &&
> +	test_path_is_file build/lib.so
>  
>  '
>  
> @@ -176,18 +176,18 @@ test_expect_success 'git clean -id (select - all)' '
>  	docs/manual.txt obj.o build/lib.so &&
>  	test_write_lines s "*" "" c |
>  	git clean -id &&
> -	test -f Makefile &&
> -	test -f README &&
> -	test -f src/part1.c &&
> -	test -f src/part2.c &&
> -	test ! -f a.out &&
> -	test ! -f docs/manual.txt &&
> -	test ! -f src/part3.c &&
> -	test ! -f src/part3.h &&
> -	test ! -f src/part4.c &&
> -	test ! -f src/part4.h &&
> -	test -f obj.o &&
> -	test -f build/lib.so
> +	test_path_is_file Makefile &&
> +	test_path_is_file README &&
> +	test_path_is_file src/part1.c &&
> +	test_path_is_file src/part2.c &&
> +	test_path_is_missing a.out &&
> +	test_path_is_missing docs/manual.txt &&
> +	test_path_is_missing src/part3.c &&
> +	test_path_is_missing src/part3.h &&
> +	test_path_is_missing src/part4.c &&
> +	test_path_is_missing src/part4.h &&
> +	test_path_is_file obj.o &&
> +	test_path_is_file build/lib.so
>  
>  '
>  
> @@ -198,18 +198,18 @@ test_expect_success 'git clean -id (select - none)' '
>  	docs/manual.txt obj.o build/lib.so &&
>  	test_write_lines s "" c |
>  	git clean -id &&
> -	test -f Makefile &&
> -	test -f README &&
> -	test -f src/part1.c &&
> -	test -f src/part2.c &&
> -	test -f a.out &&
> -	test -f docs/manual.txt &&
> -	test -f src/part3.c &&
> -	test -f src/part3.h &&
> -	test -f src/part4.c &&
> -	test -f src/part4.h &&
> -	test -f obj.o &&
> -	test -f build/lib.so
> +	test_path_is_file Makefile &&
> +	test_path_is_file README &&
> +	test_path_is_file src/part1.c &&
> +	test_path_is_file src/part2.c &&
> +	test_path_is_file a.out &&
> +	test_path_is_file docs/manual.txt &&
> +	test_path_is_file src/part3.c &&
> +	test_path_is_file src/part3.h &&
> +	test_path_is_file src/part4.c &&
> +	test_path_is_file src/part4.h &&
> +	test_path_is_file obj.o &&
> +	test_path_is_file build/lib.so
>  
>  '
>  
> @@ -220,18 +220,18 @@ test_expect_success 'git clean -id (select - number)' '
>  	docs/manual.txt obj.o build/lib.so &&
>  	test_write_lines s 3 "" c |
>  	git clean -id &&
> -	test -f Makefile &&
> -	test -f README &&
> -	test -f src/part1.c &&
> -	test -f src/part2.c &&
> -	test -f a.out &&
> -	test -f docs/manual.txt &&
> -	test ! -f src/part3.c &&
> -	test -f src/part3.h &&
> -	test -f src/part4.c &&
> -	test -f src/part4.h &&
> -	test -f obj.o &&
> -	test -f build/lib.so
> +	test_path_is_file Makefile &&
> +	test_path_is_file README &&
> +	test_path_is_file src/part1.c &&
> +	test_path_is_file src/part2.c &&
> +	test_path_is_file a.out &&
> +	test_path_is_file docs/manual.txt &&
> +	test_path_is_missing src/part3.c &&
> +	test_path_is_file src/part3.h &&
> +	test_path_is_file src/part4.c &&
> +	test_path_is_file src/part4.h &&
> +	test_path_is_file obj.o &&
> +	test_path_is_file build/lib.so
>  
>  '
>  
> @@ -242,18 +242,18 @@ test_expect_success 'git clean -id (select - number 2)' '
>  	docs/manual.txt obj.o build/lib.so &&
>  	test_write_lines s "2 3" 5 "" c |
>  	git clean -id &&
> -	test -f Makefile &&
> -	test -f README &&
> -	test -f src/part1.c &&
> -	test -f src/part2.c &&
> -	test -f a.out &&
> -	test ! -f docs/manual.txt &&
> -	test ! -f src/part3.c &&
> -	test -f src/part3.h &&
> -	test ! -f src/part4.c &&
> -	test -f src/part4.h &&
> -	test -f obj.o &&
> -	test -f build/lib.so
> +	test_path_is_file Makefile &&
> +	test_path_is_file README &&
> +	test_path_is_file src/part1.c &&
> +	test_path_is_file src/part2.c &&
> +	test_path_is_file a.out &&
> +	test_path_is_missing docs/manual.txt &&
> +	test_path_is_missing src/part3.c &&
> +	test_path_is_file src/part3.h &&
> +	test_path_is_missing src/part4.c &&
> +	test_path_is_file src/part4.h &&
> +	test_path_is_file obj.o &&
> +	test_path_is_file build/lib.so
>  
>  '
>  
> @@ -264,18 +264,18 @@ test_expect_success 'git clean -id (select - number 3)' '
>  	docs/manual.txt obj.o build/lib.so &&
>  	test_write_lines s "3,4 5" "" c |
>  	git clean -id &&
> -	test -f Makefile &&
> -	test -f README &&
> -	test -f src/part1.c &&
> -	test -f src/part2.c &&
> -	test -f a.out &&
> -	test -f docs/manual.txt &&
> -	test ! -f src/part3.c &&
> -	test ! -f src/part3.h &&
> -	test ! -f src/part4.c &&
> -	test -f src/part4.h &&
> -	test -f obj.o &&
> -	test -f build/lib.so
> +	test_path_is_file Makefile &&
> +	test_path_is_file README &&
> +	test_path_is_file src/part1.c &&
> +	test_path_is_file src/part2.c &&
> +	test_path_is_file a.out &&
> +	test_path_is_file docs/manual.txt &&
> +	test_path_is_missing src/part3.c &&
> +	test_path_is_missing src/part3.h &&
> +	test_path_is_missing src/part4.c &&
> +	test_path_is_file src/part4.h &&
> +	test_path_is_file obj.o &&
> +	test_path_is_file build/lib.so
>  
>  '
>  
> @@ -285,11 +285,11 @@ test_expect_success 'git clean -id (select - filenames)' '
>  	touch a.out foo.txt bar.txt baz.txt &&
>  	test_write_lines s "a.out fo ba bar" "" c |
>  	git clean -id &&
> -	test -f Makefile &&
> -	test ! -f a.out &&
> -	test ! -f foo.txt &&
> -	test ! -f bar.txt &&
> -	test -f baz.txt &&
> +	test_path_is_file Makefile &&
> +	test_path_is_missing a.out &&
> +	test_path_is_missing foo.txt &&
> +	test_path_is_missing bar.txt &&
> +	test_path_is_file baz.txt &&
>  	rm baz.txt
>  
>  '
> @@ -301,18 +301,18 @@ test_expect_success 'git clean -id (select - range)' '
>  	docs/manual.txt obj.o build/lib.so &&
>  	test_write_lines s "1,3-4" 2 "" c |
>  	git clean -id &&
> -	test -f Makefile &&
> -	test -f README &&
> -	test -f src/part1.c &&
> -	test -f src/part2.c &&
> -	test ! -f a.out &&
> -	test ! -f src/part3.c &&
> -	test ! -f src/part3.h &&
> -	test -f src/part4.c &&
> -	test -f src/part4.h &&
> -	test ! -f docs/manual.txt &&
> -	test -f obj.o &&
> -	test -f build/lib.so
> +	test_path_is_file Makefile &&
> +	test_path_is_file README &&
> +	test_path_is_file src/part1.c &&
> +	test_path_is_file src/part2.c &&
> +	test_path_is_missing a.out &&
> +	test_path_is_missing src/part3.c &&
> +	test_path_is_missing src/part3.h &&
> +	test_path_is_file src/part4.c &&
> +	test_path_is_file src/part4.h &&
> +	test_path_is_missing docs/manual.txt &&
> +	test_path_is_file obj.o &&
> +	test_path_is_file build/lib.so
>  
>  '
>  
> @@ -323,18 +323,18 @@ test_expect_success 'git clean -id (select - range 2)' '
>  	docs/manual.txt obj.o build/lib.so &&
>  	test_write_lines s "4- 1" "" c |
>  	git clean -id &&
> -	test -f Makefile &&
> -	test -f README &&
> -	test -f src/part1.c &&
> -	test -f src/part2.c &&
> -	test ! -f a.out &&
> -	test -f docs/manual.txt &&
> -	test -f src/part3.c &&
> -	test ! -f src/part3.h &&
> -	test ! -f src/part4.c &&
> -	test ! -f src/part4.h &&
> -	test -f obj.o &&
> -	test -f build/lib.so
> +	test_path_is_file Makefile &&
> +	test_path_is_file README &&
> +	test_path_is_file src/part1.c &&
> +	test_path_is_file src/part2.c &&
> +	test_path_is_missing a.out &&
> +	test_path_is_file docs/manual.txt &&
> +	test_path_is_file src/part3.c &&
> +	test_path_is_missing src/part3.h &&
> +	test_path_is_missing src/part4.c &&
> +	test_path_is_missing src/part4.h &&
> +	test_path_is_file obj.o &&
> +	test_path_is_file build/lib.so
>  
>  '
>  
> @@ -345,18 +345,18 @@ test_expect_success 'git clean -id (inverse select)' '
>  	docs/manual.txt obj.o build/lib.so &&
>  	test_write_lines s "*" "-5- 1 -2" "" c |
>  	git clean -id &&
> -	test -f Makefile &&
> -	test -f README &&
> -	test -f src/part1.c &&
> -	test -f src/part2.c &&
> -	test ! -f a.out &&
> -	test -f docs/manual.txt &&
> -	test ! -f src/part3.c &&
> -	test ! -f src/part3.h &&
> -	test -f src/part4.c &&
> -	test -f src/part4.h &&
> -	test -f obj.o &&
> -	test -f build/lib.so
> +	test_path_is_file Makefile &&
> +	test_path_is_file README &&
> +	test_path_is_file src/part1.c &&
> +	test_path_is_file src/part2.c &&
> +	test_path_is_missing a.out &&
> +	test_path_is_file docs/manual.txt &&
> +	test_path_is_missing src/part3.c &&
> +	test_path_is_missing src/part3.h &&
> +	test_path_is_file src/part4.c &&
> +	test_path_is_file src/part4.h &&
> +	test_path_is_file obj.o &&
> +	test_path_is_file build/lib.so
>  
>  '
>  
> @@ -367,18 +367,18 @@ test_expect_success 'git clean -id (ask)' '
>  	docs/manual.txt obj.o build/lib.so &&
>  	test_write_lines a Y y no yes bad "" |
>  	git clean -id &&
> -	test -f Makefile &&
> -	test -f README &&
> -	test -f src/part1.c &&
> -	test -f src/part2.c &&
> -	test ! -f a.out &&
> -	test ! -f docs/manual.txt &&
> -	test -f src/part3.c &&
> -	test ! -f src/part3.h &&
> -	test -f src/part4.c &&
> -	test -f src/part4.h &&
> -	test -f obj.o &&
> -	test -f build/lib.so
> +	test_path_is_file Makefile &&
> +	test_path_is_file README &&
> +	test_path_is_file src/part1.c &&
> +	test_path_is_file src/part2.c &&
> +	test_path_is_missing a.out &&
> +	test_path_is_missing docs/manual.txt &&
> +	test_path_is_file src/part3.c &&
> +	test_path_is_missing src/part3.h &&
> +	test_path_is_file src/part4.c &&
> +	test_path_is_file src/part4.h &&
> +	test_path_is_file obj.o &&
> +	test_path_is_file build/lib.so
>  
>  '
>  
> @@ -389,18 +389,18 @@ test_expect_success 'git clean -id (ask - Ctrl+D)' '
>  	docs/manual.txt obj.o build/lib.so &&
>  	test_write_lines a Y no yes "\04" |
>  	git clean -id &&
> -	test -f Makefile &&
> -	test -f README &&
> -	test -f src/part1.c &&
> -	test -f src/part2.c &&
> -	test ! -f a.out &&
> -	test -f docs/manual.txt &&
> -	test ! -f src/part3.c &&
> -	test -f src/part3.h &&
> -	test -f src/part4.c &&
> -	test -f src/part4.h &&
> -	test -f obj.o &&
> -	test -f build/lib.so
> +	test_path_is_file Makefile &&
> +	test_path_is_file README &&
> +	test_path_is_file src/part1.c &&
> +	test_path_is_file src/part2.c &&
> +	test_path_is_missing a.out &&
> +	test_path_is_file docs/manual.txt &&
> +	test_path_is_missing src/part3.c &&
> +	test_path_is_file src/part3.h &&
> +	test_path_is_file src/part4.c &&
> +	test_path_is_file src/part4.h &&
> +	test_path_is_file obj.o &&
> +	test_path_is_file build/lib.so
>  
>  '
>  
> @@ -412,18 +412,18 @@ test_expect_success 'git clean -id with prefix and path (filter)' '
>  	(cd build/ &&
>  	 test_write_lines f docs "*.h" "" c |
>  	 git clean -id ..) &&
> -	test -f Makefile &&
> -	test -f README &&
> -	test -f src/part1.c &&
> -	test -f src/part2.c &&
> -	test ! -f a.out &&
> -	test -f docs/manual.txt &&
> -	test ! -f src/part3.c &&
> -	test -f src/part3.h &&
> -	test ! -f src/part4.c &&
> -	test -f src/part4.h &&
> -	test -f obj.o &&
> -	test -f build/lib.so
> +	test_path_is_file Makefile &&
> +	test_path_is_file README &&
> +	test_path_is_file src/part1.c &&
> +	test_path_is_file src/part2.c &&
> +	test_path_is_missing a.out &&
> +	test_path_is_file docs/manual.txt &&
> +	test_path_is_missing src/part3.c &&
> +	test_path_is_file src/part3.h &&
> +	test_path_is_missing src/part4.c &&
> +	test_path_is_file src/part4.h &&
> +	test_path_is_file obj.o &&
> +	test_path_is_file build/lib.so
>  
>  '
>  
> @@ -435,18 +435,18 @@ test_expect_success 'git clean -id with prefix and path (select by name)' '
>  	(cd build/ &&
>  	 test_write_lines s ../docs/ ../src/part3.c ../src/part4.c "" c |
>  	 git clean -id ..) &&
> -	test -f Makefile &&
> -	test -f README &&
> -	test -f src/part1.c &&
> -	test -f src/part2.c &&
> -	test -f a.out &&
> -	test ! -f docs/manual.txt &&
> -	test ! -f src/part3.c &&
> -	test -f src/part3.h &&
> -	test ! -f src/part4.c &&
> -	test -f src/part4.h &&
> -	test -f obj.o &&
> -	test -f build/lib.so
> +	test_path_is_file Makefile &&
> +	test_path_is_file README &&
> +	test_path_is_file src/part1.c &&
> +	test_path_is_file src/part2.c &&
> +	test_path_is_file a.out &&
> +	test_path_is_missing docs/manual.txt &&
> +	test_path_is_missing src/part3.c &&
> +	test_path_is_file src/part3.h &&
> +	test_path_is_missing src/part4.c &&
> +	test_path_is_file src/part4.h &&
> +	test_path_is_file obj.o &&
> +	test_path_is_file build/lib.so
>  
>  '
>  
> @@ -458,18 +458,18 @@ test_expect_success 'git clean -id with prefix and path (ask)' '
>  	(cd build/ &&
>  	 test_write_lines a Y y no yes bad "" |
>  	 git clean -id ..) &&
> -	test -f Makefile &&
> -	test -f README &&
> -	test -f src/part1.c &&
> -	test -f src/part2.c &&
> -	test ! -f a.out &&
> -	test ! -f docs/manual.txt &&
> -	test -f src/part3.c &&
> -	test ! -f src/part3.h &&
> -	test -f src/part4.c &&
> -	test -f src/part4.h &&
> -	test -f obj.o &&
> -	test -f build/lib.so
> +	test_path_is_file Makefile &&
> +	test_path_is_file README &&
> +	test_path_is_file src/part1.c &&
> +	test_path_is_file src/part2.c &&
> +	test_path_is_missing a.out &&
> +	test_path_is_missing docs/manual.txt &&
> +	test_path_is_file src/part3.c &&
> +	test_path_is_missing src/part3.h &&
> +	test_path_is_file src/part4.c &&
> +	test_path_is_file src/part4.h &&
> +	test_path_is_file obj.o &&
> +	test_path_is_file build/lib.so
>  
>  '
>  
> -- 
> 2.34.1
> 
> 
Previous: Vincenzo MezzelaNext: Vincenzo Mezzela
Message 7 of 14 in “microproject: use test_path_is_* functions in test scripts”
  1. Vincenzo MezzelaFeb 19, 2024
  2. [GSOC][RFC PATCH 1/1] t: t7301-clean-interactive: Use test_path_is_(missing|file)Vincenzo Mezzela, Feb 19, 2024
  3. Christian CouderFeb 26, 2024
  4. Eric SunshineFeb 19, 2024
  5. [GSOC][PATCH v2 0/1] microproject: use test_path_is_* functions in test scriptsVincenzo Mezzela, Feb 27, 2024
  6. [GSOC][PATCH v2 1/1] t7301: use test_path_is_(missing|file)Vincenzo Mezzela, Feb 27, 2024
  7. Patrick SteinhardtMar 4, 2024
  8. [GSOC][PATCH v3 0/1] microproject: use test_path_is_* functions in test scriptsVincenzo Mezzela, Mar 4, 2024
  9. [GSOC][PATCH v3 1/1] t7301: use test_path_is_(missing|file)Vincenzo Mezzela, Mar 4, 2024
  10. Junio C HamanoMar 4, 2024
  11. Eric SunshineMar 4, 2024
  12. [GSOC][PATCH v4 0/1] microproject: use test_path_is_* functions in test scriptsVincenzo Mezzela, Mar 10, 2024
  13. [GSOC][PATCH v4 1/1] t7301: use test_path_is_(missing|file)Vincenzo Mezzela, Mar 10, 2024
  14. Junio C HamanoMar 11, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.