Commit 0f362716 by Antonio Scandurra Committed by Carlos Martín Nieto

Add more tests for path matching with globs and path delimiters

parent 029c9346
...@@ -132,6 +132,20 @@ void test_attr_ignore__leading_stars(void) ...@@ -132,6 +132,20 @@ void test_attr_ignore__leading_stars(void)
assert_is_ignored(false, "dir1/kid2/file"); assert_is_ignored(false, "dir1/kid2/file");
} }
void test_attr_ignore__globs_and_path_delimiters(void)
{
cl_git_rewritefile("attr/.gitignore", "**/_*/");
assert_is_ignored(false, "test_folder/file");
assert_is_ignored(true, "_test/file");
assert_is_ignored(true, "_test/a/file");
cl_git_rewritefile("attr/.gitignore", "**/_*/foo/bar/*ux");
assert_is_ignored(true, "_test/foo/bar/qux/file");
assert_is_ignored(true, "_test/foo/bar/crux/file");
assert_is_ignored(false, "_test/foo/bar/code/file");
}
void test_attr_ignore__skip_gitignore_directory(void) void test_attr_ignore__skip_gitignore_directory(void)
{ {
cl_git_rewritefile("attr/.git/info/exclude", "/NewFolder\n/NewFolder/NewFolder"); cl_git_rewritefile("attr/.git/info/exclude", "/NewFolder\n/NewFolder/NewFolder");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment