mirror of
https://github.com/sharkdp/fd
synced 2024-09-30 04:55:28 +00:00
tests: Add tests for ignoring .git/
This commit is contained in:
parent
53fd416c47
commit
8897659607
|
@ -2556,3 +2556,27 @@ fn test_invalid_cwd() {
|
|||
panic!("{:?}", output);
|
||||
}
|
||||
}
|
||||
|
||||
/// Test behavior of .git directory with various flags
|
||||
#[test]
|
||||
fn test_git_dir() {
|
||||
let te = TestEnv::new(
|
||||
&[".git/one"],
|
||||
&[".git/one/foo.a", ".git/.foo", ".git/a.foo"],
|
||||
);
|
||||
|
||||
te.assert_output(&["--hidden", "foo"], "");
|
||||
te.assert_output(&["--no-ignore", "foo"], "");
|
||||
te.assert_output(
|
||||
&["--hidden", "--no-ignore", "foo"],
|
||||
".git/one/foo.a
|
||||
.git/.foo
|
||||
.git/a.foo",
|
||||
);
|
||||
te.assert_output(
|
||||
&["--hidden", "--no-ignore-vcs", "foo"],
|
||||
".git/one/foo.a
|
||||
.git/.foo
|
||||
.git/a.foo",
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue