summaryrefslogtreecommitdiff
path: root/t/t1011-read-tree-sparse-checkout.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t1011-read-tree-sparse-checkout.sh')
-rwxr-xr-xt/t1011-read-tree-sparse-checkout.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/t/t1011-read-tree-sparse-checkout.sh b/t/t1011-read-tree-sparse-checkout.sh
index 0ef11bccb4..de84e35c43 100755
--- a/t/t1011-read-tree-sparse-checkout.sh
+++ b/t/t1011-read-tree-sparse-checkout.sh
@@ -94,12 +94,20 @@ test_expect_success 'match directories with trailing slash' '
test -f sub/added
'
-test_expect_failure 'match directories without trailing slash' '
- echo init.t >.git/info/sparse-checkout &&
+test_expect_success 'match directories without trailing slash' '
echo sub >>.git/info/sparse-checkout &&
git read-tree -m -u HEAD &&
git ls-files -t >result &&
- test_cmp expected.swt result &&
+ test_cmp expected.swt-noinit result &&
+ test ! -f init.t &&
+ test -f sub/added
+'
+
+test_expect_success 'match directory pattern' '
+ echo "s?b" >>.git/info/sparse-checkout &&
+ git read-tree -m -u HEAD &&
+ git ls-files -t >result &&
+ test_cmp expected.swt-noinit result &&
test ! -f init.t &&
test -f sub/added
'