On Mon, Dec 7, 2015 at 4:40 PM, Junio C Hamano <gits...@pobox.com> wrote:
> James <rouz...@gmail.com> writes:
>> @@ -46,15 +46,15 @@ test_expect_success 'git clean' '
>>       mkdir -p build docs &&
>>       touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
>>       git clean &&
>> -     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 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_file docs/manual.txt &&
>> +     test_path_is_file obj.o &&
>> +     test_path_is_file build/lib.so
>
> The verbosity of this conversion makes me wonder if we want to have
> "test_paths_are_files" and "test_paths_are_missing".  For that
> matter, this test does not really care about the distinction between
> files and directories (e.g. some tests said "test ! -d docs" and
> would have passed if there were a 'docs' regular file, but what we
> really care about is the path 'docs' is _gone_), so what we want may
> be test_paths_exist and test_paths_are_missing.  With that, the
> above hunk would become
>
>         test_paths_exist Makefile README src/part1.c src/part2.c \
>                 obj.o build/lib.so &&
>         test_paths_are_missing a.out src/part3.c
>
> I dunno.

Alternately, update test_path_foo() functions to accept multiple
pathnames, or is that too ugly?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to