mirror of
https://github.com/libgit2/libgit2.git
synced 2026-01-25 02:56:17 +00:00
tests: status::ignore: fix style of a test
This commit is contained in:
committed by
Edward Thomson
parent
446b85c334
commit
5fff24ea17
@@ -1158,29 +1158,24 @@ void test_status_ignore__subdir_ignore_everything_except_certain_files(void)
|
||||
|
||||
void test_status_ignore__deeper(void)
|
||||
{
|
||||
int ignored;
|
||||
const char *test_files[] = {
|
||||
"empty_standard_repo/foo.data",
|
||||
"empty_standard_repo/bar.data",
|
||||
"empty_standard_repo/dont_ignore/foo.data",
|
||||
"empty_standard_repo/dont_ignore/bar.data",
|
||||
NULL
|
||||
};
|
||||
|
||||
g_repo = cl_git_sandbox_init("empty_standard_repo");
|
||||
make_test_data("empty_standard_repo", test_files);
|
||||
cl_git_mkfile("empty_standard_repo/.gitignore",
|
||||
"*.data\n"
|
||||
"!dont_ignore/*.data\n");
|
||||
|
||||
cl_git_mkfile("empty_standard_repo/.gitignore",
|
||||
"*.data\n"
|
||||
"!dont_ignore/*.data\n");
|
||||
assert_is_ignored("foo.data");
|
||||
assert_is_ignored("bar.data");
|
||||
|
||||
cl_git_pass(p_mkdir("empty_standard_repo/dont_ignore", 0777));
|
||||
cl_git_mkfile("empty_standard_repo/foo.data", "");
|
||||
cl_git_mkfile("empty_standard_repo/bar.data", "");
|
||||
cl_git_mkfile("empty_standard_repo/dont_ignore/foo.data", "");
|
||||
cl_git_mkfile("empty_standard_repo/dont_ignore/bar.data", "");
|
||||
|
||||
cl_git_pass(git_ignore_path_is_ignored(&ignored, g_repo, "foo.data"));
|
||||
cl_assert_equal_i(1, ignored);
|
||||
cl_git_pass(git_ignore_path_is_ignored(&ignored, g_repo, "bar.data"));
|
||||
cl_assert_equal_i(1, ignored);
|
||||
|
||||
cl_git_pass(git_ignore_path_is_ignored(&ignored, g_repo, "dont_ignore/foo.data"));
|
||||
cl_assert_equal_i(0, ignored);
|
||||
cl_git_pass(git_ignore_path_is_ignored(&ignored, g_repo, "dont_ignore/bar.data"));
|
||||
cl_assert_equal_i(0, ignored);
|
||||
refute_is_ignored("dont_ignore/foo.data");
|
||||
refute_is_ignored("dont_ignore/bar.data");
|
||||
}
|
||||
|
||||
void test_status_ignore__unignored_dir_with_ignored_contents(void)
|
||||
|
||||
Reference in New Issue
Block a user