Skip to content
Myr

tests: Add more tests cases for ignoring .git

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Thayne McCombs · committed by David Peter · parent 08910e4 · Browse files · 1 file+14 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+14 added−4 removed

  • tests:+14 added−4 removed

1 file+14 added−4 removed

modified:tests/tests.rs+14 added-4 removed
2559 unmodified lines
2560/// Test behavior of .git directory with various flags2561#[test]2562fn test_git_dir() {2563 let te = TestEnv::new(2564 &[".git/one"],2565 &[".git/one/foo.a", ".git/.foo", ".git/a.foo"],2564 &[".git/one", "other_dir/.git", "nested/dir/.git"],2565 &[2566 ".git/one/foo.a",2567 ".git/.foo",2568 ".git/a.foo",2569 "other_dir/.git/foo1",2570 "nested/dir/.git/foo2",2571 ],2572 );25732574 te.assert_output(&["--hidden", "foo"], "");2575 te.assert_output(&["--no-ignore", "foo"], "");2576 te.assert_output(2577 &["--hidden", "--no-ignore", "foo"],2578 ".git/one/foo.a2579 .git/.foo2574 .git/a.foo",2580 .git/a.foo2581 other_dir/.git/foo12582 nested/dir/.git/foo2",2583 );2584 te.assert_output(2585 &["--hidden", "--no-ignore-vcs", "foo"],2586 ".git/one/foo.a2587 .git/.foo2580 .git/a.foo",2588 .git/a.foo2589 other_dir/.git/foo12590 nested/dir/.git/foo2",2591 );2592}