diff options
author | Russell Belfer <rb@github.com> | 2014-04-05 04:02:12 +0400 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2014-04-05 04:02:12 +0400 |
commit | 2b6b85f1168206f6f53144b9c98ecc4ce2e74a88 (patch) | |
tree | 3b012be7c233676ad8b9ab8c03fed1b25f806cdd /tests/attr | |
parent | 923c84008d6e3a4bf36ce08f9145a11b90f27185 (diff) |
Add support for ** matches in ignores
This is an experimental addition to add ** support to fnmatch
pattern matching in libgit2. It needs more testing.
Diffstat (limited to 'tests/attr')
-rw-r--r-- | tests/attr/ignore.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/attr/ignore.c b/tests/attr/ignore.c index 0f945ebf6..692f5e4ba 100644 --- a/tests/attr/ignore.c +++ b/tests/attr/ignore.c @@ -54,6 +54,19 @@ void test_attr_ignore__ignore_root(void) assert_is_ignored(true, "NewFolder/NewFolder/File.txt"); } +void test_attr_ignore__full_paths(void) +{ + cl_git_rewritefile("attr/.gitignore", "Folder/*/Contained"); + + assert_is_ignored(true, "Folder/Middle/Contained"); + assert_is_ignored(false, "Folder/Middle/More/More/Contained"); + + cl_git_rewritefile("attr/.gitignore", "Folder/**/Contained"); + + assert_is_ignored(true, "Folder/Middle/Contained"); + assert_is_ignored(true, "Folder/Middle/More/More/Contained"); +} + void test_attr_ignore__skip_gitignore_directory(void) { |