Skip to content

Commit

Permalink
t9391: avoid running test on Windows that doesn't work on Windows
Browse files Browse the repository at this point in the history
48a7dcf (lint-history: fix broken --refs option, again, 2024-07-02)
added a test with POSIX requirements, and which therefore will not run
on windows.  Copy some code from git.git into test-lib.sh to define the
WINDOWS prerequisite, and then make this test not run when on Windows.

Signed-off-by: Elijah Newren <[email protected]>
  • Loading branch information
newren committed Jul 7, 2024
1 parent 571f1c1 commit 7c178a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion t/t9391-filter-repo-lib-usage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ test_expect_success 'lint-history' '
)
'

test_expect_success 'lint-history --refs' '
test_expect_success !WINDOWS 'lint-history --refs' '
test_create_repo lint-history-only-some-refs &&
(
cd lint-history-only-some-refs &&
Expand Down
4 changes: 3 additions & 1 deletion t/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1207,7 +1207,7 @@ yes () {
done
}

# Fix some commands on Windows
# Fix some commands on Windows, and other OS-specific things
uname_s=$(uname -s)
case $uname_s in
*MINGW*)
Expand All @@ -1229,6 +1229,7 @@ case $uname_s in
test_set_prereq NATIVE_CRLF
test_set_prereq SED_STRIPS_CR
test_set_prereq GREP_STRIPS_CR
test_set_prereq WINDOWS
GIT_TEST_CMP=mingw_test_cmp
;;
*CYGWIN*)
Expand All @@ -1237,6 +1238,7 @@ case $uname_s in
test_set_prereq CYGWIN
test_set_prereq SED_STRIPS_CR
test_set_prereq GREP_STRIPS_CR
test_set_prereq WINDOWS
;;
*)
test_set_prereq POSIXPERM
Expand Down

0 comments on commit 7c178a3

Please sign in to comment.