Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/attr')
-rw-r--r--tests/attr/ignore.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/attr/ignore.c b/tests/attr/ignore.c
index 68875194d..5eadc7b3e 100644
--- a/tests/attr/ignore.c
+++ b/tests/attr/ignore.c
@@ -81,6 +81,24 @@ void test_attr_ignore__full_paths(void)
assert_is_ignored(false, "Folder/Middle/More/More/Contained/Not/Happy/Child");
}
+void test_attr_ignore__more_starstar_cases(void)
+{
+ cl_must_pass(p_unlink("attr/.gitignore"));
+ cl_git_mkfile(
+ "attr/dir/.gitignore",
+ "sub/**/*.html\n");
+
+ assert_is_ignored(false, "aaa.html");
+ assert_is_ignored(false, "dir");
+ assert_is_ignored(false, "dir/sub");
+ assert_is_ignored(true, "dir/sub/sub2/aaa.html");
+ assert_is_ignored(true, "dir/sub/aaa.html");
+ assert_is_ignored(false, "dir/aaa.html");
+ assert_is_ignored(false, "sub");
+ assert_is_ignored(false, "sub/aaa.html");
+ assert_is_ignored(false, "sub/sub2/aaa.html");
+}
+
void test_attr_ignore__leading_stars(void)
{
cl_git_rewritefile(