diff options
Diffstat (limited to 'tests/ignore/path.c')
-rw-r--r-- | tests/ignore/path.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ignore/path.c b/tests/ignore/path.c index bfed297c2..95269959c 100644 --- a/tests/ignore/path.c +++ b/tests/ignore/path.c @@ -230,6 +230,28 @@ void test_ignore_path__globs_and_path_delimiters(void) assert_is_ignored(false, "_test/foo/bar/code/file"); } +void test_ignore_path__globs_without_star(void) +{ + cl_git_rewritefile( + "attr/.gitignore", + "*.foo\n" + "**.bar\n" + ); + + assert_is_ignored(true, ".foo"); + assert_is_ignored(true, "xyz.foo"); + assert_is_ignored(true, ".bar"); + assert_is_ignored(true, "x.bar"); + assert_is_ignored(true, "xyz.bar"); + + assert_is_ignored(true, "test/.foo"); + assert_is_ignored(true, "test/x.foo"); + assert_is_ignored(true, "test/xyz.foo"); + assert_is_ignored(true, "test/.bar"); + assert_is_ignored(true, "test/x.bar"); + assert_is_ignored(true, "test/xyz.bar"); +} + void test_ignore_path__skip_gitignore_directory(void) { cl_git_rewritefile("attr/.git/info/exclude", "/NewFolder\n/NewFolder/NewFolder"); |