зеркало из https://github.com/microsoft/git.git
t3701: verify that we can add *lots* of files interactively
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Родитель
46de9aa9d3
Коммит
e05393e871
|
@ -743,6 +743,27 @@ test_expect_success 'add -p patch editing works with pathological context lines'
|
|||
test_cmp expected-2 actual
|
||||
'
|
||||
|
||||
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)) ||
|
||||
break
|
||||
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 &&
|
||||
|
|
Загрузка…
Ссылка в новой задаче