diff options
Diffstat (limited to 't')
| -rwxr-xr-x | t/t1091-sparse-checkout-builtin.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/t/t1091-sparse-checkout-builtin.sh b/t/t1091-sparse-checkout-builtin.sh index e6b768a8da..7b15fa669c 100755 --- a/t/t1091-sparse-checkout-builtin.sh +++ b/t/t1091-sparse-checkout-builtin.sh @@ -1053,11 +1053,11 @@ test_expect_success 'check-rules null termination' ' test_expect_success 'clean' ' git -C repo sparse-checkout set --cone deep/deeper1 && git -C repo sparse-checkout reapply && - mkdir repo/deep/deeper2 repo/folder1 && + mkdir -p repo/deep/deeper2 repo/folder1/extra/inside && # Add untracked files touch repo/deep/deeper2/file && - touch repo/folder1/file && + touch repo/folder1/extra/inside/file && test_must_fail git -C repo sparse-checkout clean 2>err && grep "refusing to clean" err && @@ -1074,7 +1074,15 @@ test_expect_success 'clean' ' git -C repo sparse-checkout clean --dry-run >out && test_cmp expect out && test_path_exists repo/deep/deeper2 && - test_path_exists repo/folder1 && + test_path_exists repo/folder1/extra/inside/file && + + cat >expect <<-\EOF && + Would remove deep/deeper2/file + Would remove folder1/extra/inside/file + EOF + + git -C repo sparse-checkout clean --dry-run --verbose >out && + test_cmp expect out && cat >expect <<-\EOF && Removing deep/deeper2/ |
