Skip to content

Commit 1d3c98c

Browse files
committed
Merge 'win-tests-fixes' into HEAD
2 parents 65af238 + abb1ee7 commit 1d3c98c

23 files changed

+153
-48
lines changed

git-sh-setup.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ GIT_QUIET=
5959
say () {
6060
if test -z "$GIT_QUIET"
6161
then
62-
printf '%s\n' "$*"
62+
cat <<EOF
63+
$*
64+
EOF
6365
fi
6466
}
6567

git-submodule.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,11 @@ cmd_add()
309309

310310
if test -z "$force" && ! git add --dry-run --ignore-missing "$sm_path" > /dev/null 2>&1
311311
then
312-
eval_gettextln "The following path is ignored by one of your .gitignore files:
313-
\$sm_path
314-
Use -f if you really want to add it." >&2
312+
cat >&2 <<EOF
313+
The following path is ignored by one of your .gitignore files:
314+
$(eval_gettextln $sm_path)
315+
Use -f if you really want to add it.
316+
EOF
315317
exit 1
316318
fi
317319

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/lib-git-daemon.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ then
2323
test_done
2424
fi
2525

26+
if ! test_have_prereq PIPE
27+
then
28+
test_skip_or_die $GIT_TEST_GIT_DAEMON "file system does not support FIFOs"
29+
fi
30+
2631
LIB_GIT_DAEMON_PORT=${LIB_GIT_DAEMON_PORT-${this_test#t}}
2732

2833
GIT_DAEMON_PID=

t/t0008-ignores.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ test_description=check-ignore
55
. ./test-lib.sh
66

77
init_vars () {
8-
global_excludes="$(pwd)/global-excludes"
8+
# On Windows, avoid using "C:" in the global-excludes paths.
9+
if test_have_prereq MINGW
10+
then
11+
global_excludes="global-excludes"
12+
else
13+
global_excludes="$(pwd)/global-excludes"
14+
fi
915
}
1016

1117
enable_global_excludes () {

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/t0200-gettext-basic.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ test_expect_success GETTEXT_LOCALE 'sanity: gettext(unknown) is passed through'
5858
'
5959

6060
# xgettext from C
61-
test_expect_success GETTEXT_LOCALE 'xgettext: C extraction of _() and N_() strings' '
61+
test_expect_success GETTEXT_LOCALE,!MINGW 'xgettext: C extraction of _() and N_() strings' '
6262
printf "TILRAUN: C tilraunastrengur" >expect &&
6363
printf "\n" >>expect &&
6464
printf "Sjá '\''git help SKIPUN'\'' til að sjá hjálp fyrir tiltekna skipun." >>expect &&
@@ -81,7 +81,7 @@ test_expect_success GETTEXT_LOCALE 'xgettext: Shell extraction' '
8181
test_cmp expect actual
8282
'
8383

84-
test_expect_success GETTEXT_LOCALE 'xgettext: Shell extraction with $variable' '
84+
test_expect_success GETTEXT_LOCALE,!MINGW 'xgettext: Shell extraction with $variable' '
8585
printf "TILRAUN: Skeljartilraunastrengur með breytunni a var i able" >x-expect &&
8686
LANGUAGE=is LC_ALL="$is_IS_locale" variable="a var i able" eval_gettext "TEST: A Shell test \$variable" >x-actual &&
8787
test_cmp x-expect x-actual
@@ -94,7 +94,7 @@ test_expect_success GETTEXT_LOCALE 'xgettext: Perl extraction' '
9494
test_cmp expect actual
9595
'
9696

97-
test_expect_success GETTEXT_LOCALE 'xgettext: Perl extraction with %s' '
97+
test_expect_success GETTEXT_LOCALE,!MINGW 'xgettext: Perl extraction with %s' '
9898
printf "TILRAUN: Perl tilraunastrengur með breytunni %%s" >expect &&
9999
LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: A Perl test variable %s" >actual &&
100100
test_cmp expect actual

t/t0204-gettext-reencode-sanity.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ test_description="Gettext reencoding of our *.po/*.mo files works"
77

88
. ./lib-gettext.sh
99

10+
if test_have_prereq MINGW
11+
then
12+
# There is no MinGW 'locale', but an MSys2 one that interferes
13+
# with this test (the MinGW and MSys2 locales are in fundamentally
14+
# different realms).
15+
skip_all='No native locale.exe available'
16+
test_done
17+
fi
18+
1019
# The constants used in a tricky observation for undefined behaviour
1120
RUNES="TILRAUN: ᚻᛖ ᚳᚹᚫᚦ ᚦᚫᛏ ᚻᛖ ᛒᚢᛞᛖ ᚩᚾ ᚦᚫᛗ ᛚᚪᚾᛞᛖ ᚾᚩᚱᚦᚹᛖᚪᚱᛞᚢᛗ ᚹᛁᚦ ᚦᚪ ᚹᛖᛥᚫ"
1221
PUNTS="TILRAUN: ?? ???? ??? ?? ???? ?? ??? ????? ??????????? ??? ?? ????"

t/t1501-worktree.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 &&

0 commit comments

Comments
 (0)