mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-28 06:47:53 +00:00
Add more tests for path matching with globs and path delimiters
This commit is contained in:
parent
029c93464f
commit
0f36271646
@ -132,6 +132,20 @@ void test_attr_ignore__leading_stars(void)
|
||||
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)
|
||||
{
|
||||
cl_git_rewritefile("attr/.git/info/exclude", "/NewFolder\n/NewFolder/NewFolder");
|
||||
|
Loading…
Reference in New Issue
Block a user