Skip to content

Commit 0a2bfcc

Browse files
avargitster
authored andcommitted
t0051: use "skip_all" under !MINGW in single-test file
Have this file added in 06ba9d0 (t0051: test GIT_TRACE to a windows named pipe, 2018-09-11) use the same "skip_all" pattern as an existing Windows-only test added in 0e218f9 (mingw: unset PERL5LIB by default, 2018-10-30) uses. This way TAP consumers like "prove" will show a nice summary when the test is skipped. Instead of: $ prove t0051-windows-named-pipe.sh [...] t0051-windows-named-pipe.sh .. ok [...] We will prominently show a "skipped" notice: $ prove t0051-windows-named-pipe.sh [...] t0051-windows-named-pipe.sh ... skipped: skipping Windows-specific tests [...] This is because we are now making use of the right TAP-y way to communicate this to the consumer. I.e. skipping the whole test file, v.s. skipping individual tests (in this case there's only one test). Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5d01301 commit 0a2bfcc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

t/t0051-windows-named-pipe.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@
33
test_description='Windows named pipes'
44

55
. ./test-lib.sh
6+
if ! test_have_prereq MINGW
7+
then
8+
skip_all='skipping Windows-specific tests'
9+
test_done
10+
fi
611

7-
test_expect_success MINGW 'o_append write to named pipe' '
12+
test_expect_success 'o_append write to named pipe' '
813
GIT_TRACE="$(pwd)/expect" git status >/dev/null 2>&1 &&
914
{ test-tool windows-named-pipe t0051 >actual 2>&1 & } &&
1015
pid=$! &&

0 commit comments

Comments
 (0)