Skip to content

Commit f401c9d

Browse files
committed
Merge 'win-tests-fixes' into HEAD
2 parents fd85758 + 3bd254b commit f401c9d

11 files changed

+47
-26
lines changed

t/annotate-tests.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -274,27 +274,27 @@ test_expect_success 'blame -L X,-N' '
274274
'
275275

276276
test_expect_success 'blame -L /RE/ (RE to end)' '
277-
check_count -L/evil/ C 1 "A U Thor" 1
277+
check_count -L/\;*evil/ C 1 "A U Thor" 1
278278
'
279279

280280
test_expect_success 'blame -L /RE/,/RE2/' '
281-
check_count -L/robot/,/green/ A 1 B 1 B2 1 D 1 E 1
281+
check_count -L/\;*robot/,/\;*green/ A 1 B 1 B2 1 D 1 E 1
282282
'
283283

284284
test_expect_success 'blame -L X,/RE/' '
285-
check_count -L5,/evil/ B1 1 D 1 "A U Thor" 1
285+
check_count -L5,/\;*evil/ B1 1 D 1 "A U Thor" 1
286286
'
287287

288288
test_expect_success 'blame -L /RE/,Y' '
289-
check_count -L/99/,7 B1 1 D 1 "A U Thor" 1
289+
check_count -L/\;*99/,7 B1 1 D 1 "A U Thor" 1
290290
'
291291

292292
test_expect_success 'blame -L /RE/,+N' '
293-
check_count -L/99/,+3 B1 1 D 1 "A U Thor" 1
293+
check_count -L/\;*99/,+3 B1 1 D 1 "A U Thor" 1
294294
'
295295

296296
test_expect_success 'blame -L /RE/,-N' '
297-
check_count -L/99/,-3 B 1 B2 1 D 1
297+
check_count -L/\;*99/,-3 B 1 B2 1 D 1
298298
'
299299

300300
# 'file' ends with an incomplete line, so 'wc' reports one fewer lines than
@@ -360,31 +360,31 @@ test_expect_success 'blame -L multiple (superset/subset: unordered)' '
360360
'
361361

362362
test_expect_success 'blame -L /RE/ (relative)' '
363-
check_count -L3,3 -L/fox/ B1 1 B2 1 C 1 D 1 "A U Thor" 1
363+
check_count -L3,3 -L/\;*fox/ B1 1 B2 1 C 1 D 1 "A U Thor" 1
364364
'
365365

366366
test_expect_success 'blame -L /RE/ (relative: no preceding range)' '
367-
check_count -L/dog/ A 1 B 1 B1 1 B2 1 C 1 D 1 "A U Thor" 1
367+
check_count -L/\;*dog/ A 1 B 1 B1 1 B2 1 C 1 D 1 "A U Thor" 1
368368
'
369369

370370
test_expect_success 'blame -L /RE/ (relative: adjacent)' '
371-
check_count -L1,1 -L/dog/,+1 A 1 E 1
371+
check_count -L1,1 -L/\;*dog/,+1 A 1 E 1
372372
'
373373

374374
test_expect_success 'blame -L /RE/ (relative: not found)' '
375-
test_must_fail $PROG -L4,4 -L/dog/ file
375+
test_must_fail $PROG -L4,4 -L/\;*dog/ file
376376
'
377377

378378
test_expect_success 'blame -L /RE/ (relative: end-of-file)' '
379379
test_must_fail $PROG -L, -L/$/ file
380380
'
381381

382382
test_expect_success 'blame -L ^/RE/ (absolute)' '
383-
check_count -L3,3 -L^/dog/,+2 A 1 B2 1
383+
check_count -L3,3 -L^/\;*dog/,+2 A 1 B2 1
384384
'
385385

386386
test_expect_success 'blame -L ^/RE/ (absolute: no preceding range)' '
387-
check_count -L^/dog/,+2 A 1 B2 1
387+
check_count -L^/\;*dog/,+2 A 1 B2 1
388388
'
389389

390390
test_expect_success 'blame -L ^/RE/ (absolute: not found)' '

t/t0021-conversion.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ test_expect_success 'filter that does not read is fine' '
214214
test_cmp expect actual
215215
'
216216

217-
test_expect_success EXPENSIVE 'filter large file' '
217+
test_expect_success EXPENSIVE,!MINGW 'filter large file' '
218218
git config filter.largefile.smudge cat &&
219219
git config filter.largefile.clean cat &&
220220
for i in $(test_seq 1 2048); do printf "%1048576d" 1; done >2GB &&

t/t0027-auto-crlf.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ test_description='CRLF conversion all combinations'
44

55
. ./test-lib.sh
66

7-
if ! test_have_prereq EXPENSIVE
7+
if ! test_have_prereq EXPENSIVE && ! test_have_prereq MINGW
88
then
9-
skip_all="EXPENSIVE not set"
9+
skip_all="Neither EXPENSIVE nor MINGW set"
1010
test_done
1111
fi
1212

t/t0302-credential-store.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ helper_test store
3737
unset XDG_CONFIG_HOME
3838

3939
test_expect_success 'if custom xdg file exists, home and xdg files not created' '
40-
test_when_finished "rm -f $HOME/xdg/git/credentials" &&
40+
test_when_finished "rm -f \"$HOME/xdg/git/credentials\"" &&
4141
test -s "$HOME/xdg/git/credentials" &&
4242
test_path_is_missing "$HOME/.git-credentials" &&
4343
test_path_is_missing "$HOME/.config/git/credentials"

t/t1501-work-tree.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,10 @@ test_expect_success 'make_relative_path handles double slashes in GIT_DIR' '
339339
git --git-dir="$(pwd)//repo.git" --work-tree="$(pwd)" add dummy_file
340340
'
341341

342+
test_have_prereq MINGW &&
343+
# make sure to test DOS path on Windows
344+
TRASH_DIRECTORY="$(cd "$TRASH_DIRECTORY" && pwd)"
345+
342346
test_expect_success 'relative $GIT_WORK_TREE and git subprocesses' '
343347
GIT_DIR=repo.git GIT_WORK_TREE=repo.git/work \
344348
test-subprocess --setup-work-tree rev-parse --show-toplevel >actual &&

t/t3404-rebase-interactive.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ test_expect_success 'setup' '
6262

6363
# "exec" commands are ran with the user shell by default, but this may
6464
# be non-POSIX. For example, if SHELL=zsh then ">file" doesn't work
65-
# to create a file. Unseting SHELL avoids such non-portable behavior
65+
# to create a file. Unsetting SHELL avoids such non-portable behavior
6666
# in tests. It must be exported for it to take effect where needed.
6767
SHELL=
6868
export SHELL

t/t3900-i18n-commit.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ test_expect_success 'UTF-16 refused because of NULs' '
4040
'
4141

4242
test_expect_success 'UTF-8 invalid characters refused' '
43-
test_when_finished "rm -f $HOME/stderr $HOME/invalid" &&
43+
test_when_finished "rm -f \"$HOME/stderr $HOME/invalid\"" &&
4444
echo "UTF-8 characters" >F &&
4545
printf "Commit message\n\nInvalid surrogate:\355\240\200\n" \
4646
>"$HOME/invalid" &&
@@ -49,7 +49,7 @@ test_expect_success 'UTF-8 invalid characters refused' '
4949
'
5050

5151
test_expect_success 'UTF-8 overlong sequences rejected' '
52-
test_when_finished "rm -f $HOME/stderr $HOME/invalid" &&
52+
test_when_finished "rm -f \"$HOME/stderr $HOME/invalid\"" &&
5353
rm -f "$HOME/stderr" "$HOME/invalid" &&
5454
echo "UTF-8 overlong" >F &&
5555
printf "\340\202\251ommit message\n\nThis is not a space:\300\240\n" \
@@ -59,7 +59,7 @@ test_expect_success 'UTF-8 overlong sequences rejected' '
5959
'
6060

6161
test_expect_success 'UTF-8 non-characters refused' '
62-
test_when_finished "rm -f $HOME/stderr $HOME/invalid" &&
62+
test_when_finished "rm -f \"$HOME/stderr $HOME/invalid\"" &&
6363
echo "UTF-8 non-character 1" >F &&
6464
printf "Commit message\n\nNon-character:\364\217\277\276\n" \
6565
>"$HOME/invalid" &&
@@ -68,7 +68,7 @@ test_expect_success 'UTF-8 non-characters refused' '
6868
'
6969

7070
test_expect_success 'UTF-8 non-characters refused' '
71-
test_when_finished "rm -f $HOME/stderr $HOME/invalid" &&
71+
test_when_finished "rm -f \"$HOME/stderr $HOME/invalid\"" &&
7272
echo "UTF-8 non-character 2." >F &&
7373
printf "Commit message\n\nNon-character:\357\267\220\n" \
7474
>"$HOME/invalid" &&

t/t5503-tagfollow.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ get_needs () {
5252
' "$1"
5353
}
5454

55-
test_expect_success 'fetch A (new commit : 1 connection)' '
55+
test_expect_failure 'fetch A (new commit : 1 connection)' ' # TODO known breakage
5656
rm -f $U &&
5757
(
5858
cd cloned &&
@@ -82,7 +82,7 @@ want $T
8282
EOF
8383
'
8484

85-
test_expect_success 'fetch C, T (new branch, tag : 1 connection)' '
85+
test_expect_failure 'fetch C, T (new branch, tag : 1 connection)' ' # TODO known breakage
8686
rm -f $U &&
8787
(
8888
cd cloned &&
@@ -118,7 +118,7 @@ want $S
118118
EOF
119119
'
120120

121-
test_expect_success 'fetch B, S (commit and tag : 1 connection)' '
121+
test_expect_failure 'fetch B, S (commit and tag : 1 connection)' ' # TODO known breakage
122122
rm -f $U &&
123123
(
124124
cd cloned &&

t/t7001-mv.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ test_expect_success 'git mv moves a submodule with a .git directory and no .gitm
305305
(
306306
cd sub &&
307307
rm -f .git &&
308-
cp -R -P -p ../.git/modules/sub .git &&
308+
cp -a ../.git/modules/sub .git &&
309309
GIT_WORK_TREE=. git config --unset core.worktree
310310
) &&
311311
mkdir mod &&
@@ -328,7 +328,7 @@ test_expect_success 'git mv moves a submodule with a .git directory and .gitmodu
328328
(
329329
cd sub &&
330330
rm -f .git &&
331-
cp -R -P -p ../.git/modules/sub .git &&
331+
cp -a ../.git/modules/sub .git &&
332332
GIT_WORK_TREE=. git config --unset core.worktree
333333
) &&
334334
mkdir mod &&

t/t9020-remote-svn.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ then
1212
test_done
1313
fi
1414

15+
if test_have_prereq MINGW
16+
then
17+
skip_all='skipping remote-svn tests for lack of POSIX'
18+
test_done
19+
fi
20+
1521
# Override svnrdump with our simulator
1622
PATH="$HOME:$PATH"
1723
export PATH PYTHON_PATH GIT_BUILD_DIR

t/t9350-fast-export.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,4 +522,15 @@ test_expect_success 'delete refspec' '
522522
test_cmp expected actual
523523
'
524524

525+
cat > expected << EOF
526+
reset refs/heads/master
527+
from $(git rev-parse master)
528+
529+
EOF
530+
531+
test_expect_failure 'refs are updated even if no commits need to be exported' '
532+
git fast-export master..master > actual &&
533+
test_cmp expected actual
534+
'
535+
525536
test_done

0 commit comments

Comments
 (0)