Skip to content

Commit 72c28ab

Browse files
committed
tests: status::worktree: indicate skipped tests on Win32
Some function bodies of tests which are not applicable to the Win32 platform are completely #ifdef'd out instead of calling `cl_skip()`. This leaves us with no indication that these tests are not being executed at all and may thus cause decreased scrutiny when investigating skipped tests. Improve the situation by calling `cl_skip()` instead of just doing nothing.
1 parent 8999f6a commit 72c28ab

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

tests/checkout/tree.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,6 +1096,8 @@ void test_checkout_tree__filemode_preserved_in_workdir(void)
10961096
cl_assert(!GIT_PERMS_IS_EXEC(read_filemode("a/b.txt")));
10971097

10981098
git_commit_free(commit);
1099+
#else
1100+
cl_skip();
10991101
#endif
11001102
}
11011103

tests/iterator/workdir.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ void test_iterator_workdir__skips_fifos_and_special_files(void)
741741
cl_assert_equal_i(GIT_ITEROVER, git_iterator_advance(&e, i));
742742

743743
git_iterator_free(i);
744+
#else
745+
cl_skip();
744746
#endif
745747
}
746748

tests/repo/open.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ void test_repo_open__from_git_new_workdir(void)
180180
cl_assert_(git__suffixcmp(git_repository_workdir(repo2), "alternate/") == 0, git_repository_workdir(repo2));
181181

182182
git_repository_free(repo2);
183+
#else
184+
cl_skip();
183185
#endif
184186
}
185187

tests/status/worktree.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,6 +1072,8 @@ void test_status_worktree__unreadable(void)
10721072
cl_assert_equal_i(counts.expected_entry_count, counts.entry_count);
10731073
cl_assert_equal_i(0, counts.wrong_status_flags_count);
10741074
cl_assert_equal_i(0, counts.wrong_sorted_path);
1075+
#else
1076+
cl_skip();
10751077
#endif
10761078
}
10771079

@@ -1106,6 +1108,8 @@ void test_status_worktree__unreadable_not_included(void)
11061108
cl_assert_equal_i(counts.expected_entry_count, counts.entry_count);
11071109
cl_assert_equal_i(0, counts.wrong_status_flags_count);
11081110
cl_assert_equal_i(0, counts.wrong_sorted_path);
1111+
#else
1112+
cl_skip();
11091113
#endif
11101114
}
11111115

0 commit comments

Comments
 (0)