From 306dacd0b41c52392d49e2a24564c94790168782 Mon Sep 17 00:00:00 2001 From: Thayne McCombs Date: Sun, 22 Oct 2023 23:03:31 -0600 Subject: [PATCH] tests: Add more tests cases for ignoring .git --- tests/tests.rs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/tests.rs b/tests/tests.rs index 9391e9b..1edbeae 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -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", ); }