Skip to content
Myr

tests: Add tests 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 53fd416 · Browse files · 1 file+24 added−0 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+24 added−0 removed

  • tests:+24 added−0 removed

1 file+24 added−0 removed

modified:tests/tests.rs+24 added
2554 unmodified lines
2555 if !output.status.success() {2556 panic!("{:?}", output);2557 }2558}25592560/// 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"],2566 );25672568 te.assert_output(&["--hidden", "foo"], "");2569 te.assert_output(&["--no-ignore", "foo"], "");2570 te.assert_output(2571 &["--hidden", "--no-ignore", "foo"],2572 ".git/one/foo.a2573 .git/.foo2574 .git/a.foo",2575 );2576 te.assert_output(2577 &["--hidden", "--no-ignore-vcs", "foo"],2578 ".git/one/foo.a2579 .git/.foo2580 .git/a.foo",2581 );2582}