mirror of
https://github.com/sharkdp/fd
synced 2024-09-30 04:55:28 +00:00
tests: Add more tests cases for ignoring .git
This commit is contained in:
parent
08910e4e3f
commit
306dacd0b4
|
@ -2561,8 +2561,14 @@ fn test_invalid_cwd() {
|
|||
#[test]
|
||||
fn test_git_dir() {
|
||||
let te = TestEnv::new(
|
||||
&[".git/one"],
|
||||
&[".git/one/foo.a", ".git/.foo", ".git/a.foo"],
|
||||
&[".git/one", "other_dir/.git", "nested/dir/.git"],
|
||||
&[
|
||||
".git/one/foo.a",
|
||||
".git/.foo",
|
||||
".git/a.foo",
|
||||
"other_dir/.git/foo1",
|
||||
"nested/dir/.git/foo2",
|
||||
],
|
||||
);
|
||||
|
||||
te.assert_output(&["--hidden", "foo"], "");
|
||||
|
@ -2571,12 +2577,16 @@ fn test_git_dir() {
|
|||
&["--hidden", "--no-ignore", "foo"],
|
||||
".git/one/foo.a
|
||||
.git/.foo
|
||||
.git/a.foo",
|
||||
.git/a.foo
|
||||
other_dir/.git/foo1
|
||||
nested/dir/.git/foo2",
|
||||
);
|
||||
te.assert_output(
|
||||
&["--hidden", "--no-ignore-vcs", "foo"],
|
||||
".git/one/foo.a
|
||||
.git/.foo
|
||||
.git/a.foo",
|
||||
.git/a.foo
|
||||
other_dir/.git/foo1
|
||||
nested/dir/.git/foo2",
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue