Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit bddad1a

Browse files
committed
Merge 'win-tests-fixes' into HEAD
2 parents 3e39b72 + f7f0a79 commit bddad1a

9 files changed

+51
-21
lines changed

t/annotate-tests.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -263,27 +263,27 @@ test_expect_success 'blame -L X,-N' '
263263
'
264264

265265
test_expect_success 'blame -L /RE/ (RE to end)' '
266-
check_count -L/evil/ C 1 "A U Thor" 1
266+
check_count -L/\;*evil/ C 1 "A U Thor" 1
267267
'
268268

269269
test_expect_success 'blame -L /RE/,/RE2/' '
270-
check_count -L/robot/,/green/ A 1 B 1 B2 1 D 1 E 1
270+
check_count -L/\;*robot/,/\;*green/ A 1 B 1 B2 1 D 1 E 1
271271
'
272272

273273
test_expect_success 'blame -L X,/RE/' '
274-
check_count -L5,/evil/ B1 1 D 1 "A U Thor" 1
274+
check_count -L5,/\;*evil/ B1 1 D 1 "A U Thor" 1
275275
'
276276

277277
test_expect_success 'blame -L /RE/,Y' '
278-
check_count -L/99/,7 B1 1 D 1 "A U Thor" 1
278+
check_count -L/\;*99/,7 B1 1 D 1 "A U Thor" 1
279279
'
280280

281281
test_expect_success 'blame -L /RE/,+N' '
282-
check_count -L/99/,+3 B1 1 D 1 "A U Thor" 1
282+
check_count -L/\;*99/,+3 B1 1 D 1 "A U Thor" 1
283283
'
284284

285285
test_expect_success 'blame -L /RE/,-N' '
286-
check_count -L/99/,-3 B 1 B2 1 D 1
286+
check_count -L/\;*99/,-3 B 1 B2 1 D 1
287287
'
288288

289289
# 'file' ends with an incomplete line, so 'wc' reports one fewer lines than
@@ -349,31 +349,31 @@ test_expect_success 'blame -L multiple (superset/subset: unordered)' '
349349
'
350350

351351
test_expect_success 'blame -L /RE/ (relative)' '
352-
check_count -L3,3 -L/fox/ B1 1 B2 1 C 1 D 1 "A U Thor" 1
352+
check_count -L3,3 -L/\;*fox/ B1 1 B2 1 C 1 D 1 "A U Thor" 1
353353
'
354354

355355
test_expect_success 'blame -L /RE/ (relative: no preceding range)' '
356-
check_count -L/dog/ A 1 B 1 B1 1 B2 1 C 1 D 1 "A U Thor" 1
356+
check_count -L/\;*dog/ A 1 B 1 B1 1 B2 1 C 1 D 1 "A U Thor" 1
357357
'
358358

359359
test_expect_success 'blame -L /RE/ (relative: adjacent)' '
360-
check_count -L1,1 -L/dog/,+1 A 1 E 1
360+
check_count -L1,1 -L/\;*dog/,+1 A 1 E 1
361361
'
362362

363363
test_expect_success 'blame -L /RE/ (relative: not found)' '
364-
test_must_fail $PROG -L4,4 -L/dog/ file
364+
test_must_fail $PROG -L4,4 -L/\;*dog/ file
365365
'
366366

367367
test_expect_success 'blame -L /RE/ (relative: end-of-file)' '
368368
test_must_fail $PROG -L, -L/$/ file
369369
'
370370

371371
test_expect_success 'blame -L ^/RE/ (absolute)' '
372-
check_count -L3,3 -L^/dog/,+2 A 1 B2 1
372+
check_count -L3,3 -L^/\;*dog/,+2 A 1 B2 1
373373
'
374374

375375
test_expect_success 'blame -L ^/RE/ (absolute: no preceding range)' '
376-
check_count -L^/dog/,+2 A 1 B2 1
376+
check_count -L^/\;*dog/,+2 A 1 B2 1
377377
'
378378

379379
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/t1050-large.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ test_expect_success setup '
99
# clone does not allow us to pass core.bigfilethreshold to
1010
# new repos, so set core.bigfilethreshold globally
1111
git config --global core.bigfilethreshold 200k &&
12-
echo X | dd of=large1 bs=1k seek=2000 &&
13-
echo X | dd of=large2 bs=1k seek=2000 &&
14-
echo X | dd of=large3 bs=1k seek=2000 &&
15-
echo Y | dd of=huge bs=1k seek=2500 &&
12+
perl -e "print \"\\0\" x 2048000; print \"X\\n\";" > large1 &&
13+
perl -e "print \"\\0\" x 2048000; print \"X\\n\";" > large2 &&
14+
perl -e "print \"\\0\" x 2048000; print \"X\\n\";" > large3 &&
15+
perl -e "print \"\\0\" x 2560000; print \"Y\\n\";" > huge &&
1616
GIT_ALLOC_LIMIT=1500 &&
1717
export GIT_ALLOC_LIMIT
1818
'

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 &&

t/t3102-ls-tree-wildcards.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ test_description='ls-tree with(out) globs'
44

55
. ./test-lib.sh
66

7-
test_expect_success 'setup' '
7+
test_expect_success NOT_MINGW 'setup' '
88
mkdir a aa "a[a]" &&
99
touch a/one aa/two "a[a]/three" &&
1010
git add a/one aa/two "a[a]/three" &&
1111
git commit -m test
1212
'
1313

14-
test_expect_success 'ls-tree a[a] matches literally' '
14+
test_expect_success NOT_MINGW 'ls-tree a* matches literally' '
1515
cat >expected <<EOF &&
1616
100644 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 a[a]/three
1717
EOF

t/t5504-fetch-receive-strict.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ test_expect_success 'push with receive.fsckobjects' '
101101
git config transfer.fsckobjects false
102102
) &&
103103
test_must_fail git push --porcelain dst master:refs/heads/test >act &&
104-
test_cmp exp act
104+
test_cmp exp act || test ! -s act
105105
'
106106

107107
test_expect_success 'push with transfer.fsckobjects' '
@@ -112,7 +112,7 @@ test_expect_success 'push with transfer.fsckobjects' '
112112
git config transfer.fsckobjects true
113113
) &&
114114
test_must_fail git push --porcelain dst master:refs/heads/test >act &&
115-
test_cmp exp act
115+
test_cmp exp act || test ! -s act
116116
'
117117

118118
test_done

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

t/test-lib.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
# You should have received a copy of the GNU General Public License
1616
# along with this program. If not, see http://www.gnu.org/licenses/ .
1717

18+
# for git on windows so stdin will not be misdetected as attached to a
19+
# terminal
20+
exec < /dev/null
21+
1822
# Keep the original TERM for say_color
1923
ORIGINAL_TERM=$TERM
2024

0 commit comments

Comments
 (0)