diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-04-23 18:08:10 +0300 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-04-23 18:08:10 +0300 |
commit | 63e8b08dfcaa039e7bbbcfa4b5cdcea8bddf13c0 (patch) | |
tree | 2dd141bfba65683a730fdaeefd3e2a408dc59f6c /tests | |
parent | 27fa7477b008bff27c5aaecb1b2b908540a5798a (diff) | |
parent | c02a0e46eb0ec68a4069edf34a537cf319be51b6 (diff) |
Merge branch 'attr-ignore'
Diffstat (limited to 'tests')
-rw-r--r-- | tests/attr/ignore.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/attr/ignore.c b/tests/attr/ignore.c index b187db01c..aa5b87098 100644 --- a/tests/attr/ignore.c +++ b/tests/attr/ignore.c @@ -146,6 +146,24 @@ void test_attr_ignore__skip_gitignore_directory(void) assert_is_ignored(true, "NewFolder/NewFolder/File.txt"); } +void test_attr_ignore__subdirectory_gitignore(void) +{ + p_unlink("attr/.gitignore"); + cl_assert(!git_path_exists("attr/.gitignore")); + cl_git_mkfile( + "attr/.gitignore", + "file1\n"); + p_mkdir("attr/dir", 0777); + cl_git_mkfile( + "attr/dir/.gitignore", + "file2/\n"); + + assert_is_ignored(true, "file1"); + assert_is_ignored(true, "dir/file1"); + assert_is_ignored(true, "dir/file2"); /* in ignored dir */ + assert_is_ignored(false, "dir/file3"); +} + void test_attr_ignore__expand_tilde_to_homedir(void) { git_config *cfg; |