@@ -1529,28 +1529,45 @@ test_expect_success 'cone mode sparse-checkout completes directory names with sp
1529
1529
)
1530
1530
'
1531
1531
1532
- # use FUNNYNAMES to avoid running on Windows, which doesn't permit backslashes or tabs in paths
1533
- test_expect_success FUNNYNAMES ' cone mode sparse-checkout completes directory names with backslashes and tabs' '
1532
+ # use FUNNYNAMES to avoid running on Windows, which doesn't permit tabs in paths
1533
+ test_expect_success FUNNYNAMES ' cone mode sparse-checkout completes directory names with tabs' '
1534
1534
# reset sparse-checkout
1535
1535
git -C sparse-checkout sparse-checkout disable &&
1536
1536
(
1537
1537
cd sparse-checkout &&
1538
- mkdir "directory\with\backslashes" &&
1539
1538
mkdir "$(printf "directory\twith\ttabs")" &&
1540
- >"directory\with\backslashes/randomfile" &&
1541
1539
>"$(printf "directory\twith\ttabs")/randomfile" &&
1542
1540
git add . &&
1543
- git commit -m "Add directory with backslashes and directory with tabs" &&
1544
- git sparse-checkout set --cone "directory\with\backslashes" \
1541
+ git commit -m "Add directory with tabs" &&
1542
+ git sparse-checkout set --cone \
1545
1543
"$(printf "directory\twith\ttabs")" &&
1546
1544
test_completion "git sparse-checkout add dir" <<-\EOF &&
1547
- directory\with\backslashes/
1548
1545
directory with tabs/
1549
1546
EOF
1550
- rm -rf "directory\with\backslashes" &&
1551
1547
rm -rf "$(printf "directory\twith\ttabs")" &&
1552
1548
git add . &&
1553
- git commit -m "Remove directory with backslashes and directory with tabs"
1549
+ git commit -m "Remove directory with tabs"
1550
+ )
1551
+ '
1552
+
1553
+ # use FUNNYNAMES to avoid running on Windows, and !CYGWIN for Cygwin, as neither permit backslashes in paths
1554
+ test_expect_success FUNNYNAMES,! CYGWIN ' cone mode sparse-checkout completes directory names with backslashes' '
1555
+ # reset sparse-checkout
1556
+ git -C sparse-checkout sparse-checkout disable &&
1557
+ (
1558
+ cd sparse-checkout &&
1559
+ mkdir "directory\with\backslashes" &&
1560
+ >"directory\with\backslashes/randomfile" &&
1561
+ git add . &&
1562
+ git commit -m "Add directory with backslashes" &&
1563
+ git sparse-checkout set --cone \
1564
+ "directory\with\backslashes" &&
1565
+ test_completion "git sparse-checkout add dir" <<-\EOF &&
1566
+ directory\with\backslashes/
1567
+ EOF
1568
+ rm -rf "directory\with\backslashes" &&
1569
+ git add . &&
1570
+ git commit -m "Remove directory with backslashes"
1554
1571
)
1555
1572
'
1556
1573
0 commit comments