Skip to content

Commit

Permalink
t3701: verify that we can add *lots* of files interactively
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Sep 24, 2024
1 parent c71be29 commit 68c871f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions t/t3701-add-interactive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1119,6 +1119,27 @@ test_expect_success 'checkout -p patch editing of added file' '
)
'

test_expect_success EXPENSIVE 'add -i with a lot of files' '
git reset --hard &&
x160=0123456789012345678901234567890123456789 &&
x160=$x160$x160$x160$x160 &&
y= &&
i=0 &&
while test $i -le 200
do
name=$(printf "%s%03d" $x160 $i) &&
echo $name >$name &&
git add -N $name &&
y="${y}y$LF" &&
i=$(($i+1)) ||
exit 1
done &&
echo "$y" | git add -p -- . &&
git diff --cached >staged &&
test_line_count = 1407 staged &&
git reset --hard
'

test_expect_success 'show help from add--helper' '
git reset --hard &&
cat >expect <<-EOF &&
Expand Down

0 comments on commit 68c871f

Please sign in to comment.