Skip to content

Commit e7109d5

Browse files
committed
Merge branch 'ld/sparse-index-bash-completion'
Test regression fix. * ld/sparse-index-bash-completion: t9902: split test to run on appropriate systems
2 parents c42977a + 6d340df commit e7109d5

File tree

1 file changed

+26
-9
lines changed

1 file changed

+26
-9
lines changed

t/t9902-completion.sh

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,28 +1529,45 @@ test_expect_success 'cone mode sparse-checkout completes directory names with sp
15291529
)
15301530
'
15311531

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' '
15341534
# reset sparse-checkout
15351535
git -C sparse-checkout sparse-checkout disable &&
15361536
(
15371537
cd sparse-checkout &&
1538-
mkdir "directory\with\backslashes" &&
15391538
mkdir "$(printf "directory\twith\ttabs")" &&
1540-
>"directory\with\backslashes/randomfile" &&
15411539
>"$(printf "directory\twith\ttabs")/randomfile" &&
15421540
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 \
15451543
"$(printf "directory\twith\ttabs")" &&
15461544
test_completion "git sparse-checkout add dir" <<-\EOF &&
1547-
directory\with\backslashes/
15481545
directory with tabs/
15491546
EOF
1550-
rm -rf "directory\with\backslashes" &&
15511547
rm -rf "$(printf "directory\twith\ttabs")" &&
15521548
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"
15541571
)
15551572
'
15561573

0 commit comments

Comments
 (0)