mirror of
https://github.com/git/git.git
synced 2026-01-31 21:09:39 +00:00
Merge 'win-tests-fixes' into HEAD
This commit is contained in:
@@ -274,27 +274,27 @@ test_expect_success 'blame -L X,-N' '
|
||||
'
|
||||
|
||||
test_expect_success 'blame -L /RE/ (RE to end)' '
|
||||
check_count -L/evil/ C 1 "A U Thor" 1
|
||||
check_count -L/\;*evil/ C 1 "A U Thor" 1
|
||||
'
|
||||
|
||||
test_expect_success 'blame -L /RE/,/RE2/' '
|
||||
check_count -L/robot/,/green/ A 1 B 1 B2 1 D 1 E 1
|
||||
check_count -L/\;*robot/,/\;*green/ A 1 B 1 B2 1 D 1 E 1
|
||||
'
|
||||
|
||||
test_expect_success 'blame -L X,/RE/' '
|
||||
check_count -L5,/evil/ B1 1 D 1 "A U Thor" 1
|
||||
check_count -L5,/\;*evil/ B1 1 D 1 "A U Thor" 1
|
||||
'
|
||||
|
||||
test_expect_success 'blame -L /RE/,Y' '
|
||||
check_count -L/99/,7 B1 1 D 1 "A U Thor" 1
|
||||
check_count -L/\;*99/,7 B1 1 D 1 "A U Thor" 1
|
||||
'
|
||||
|
||||
test_expect_success 'blame -L /RE/,+N' '
|
||||
check_count -L/99/,+3 B1 1 D 1 "A U Thor" 1
|
||||
check_count -L/\;*99/,+3 B1 1 D 1 "A U Thor" 1
|
||||
'
|
||||
|
||||
test_expect_success 'blame -L /RE/,-N' '
|
||||
check_count -L/99/,-3 B 1 B2 1 D 1
|
||||
check_count -L/\;*99/,-3 B 1 B2 1 D 1
|
||||
'
|
||||
|
||||
# 'file' ends with an incomplete line, so 'wc' reports one fewer lines than
|
||||
@@ -360,19 +360,19 @@ test_expect_success 'blame -L multiple (superset/subset: unordered)' '
|
||||
'
|
||||
|
||||
test_expect_success 'blame -L /RE/ (relative)' '
|
||||
check_count -L3,3 -L/fox/ B1 1 B2 1 C 1 D 1 "A U Thor" 1
|
||||
check_count -L3,3 -L/\;*fox/ B1 1 B2 1 C 1 D 1 "A U Thor" 1
|
||||
'
|
||||
|
||||
test_expect_success 'blame -L /RE/ (relative: no preceding range)' '
|
||||
check_count -L/dog/ A 1 B 1 B1 1 B2 1 C 1 D 1 "A U Thor" 1
|
||||
check_count -L/\;*dog/ A 1 B 1 B1 1 B2 1 C 1 D 1 "A U Thor" 1
|
||||
'
|
||||
|
||||
test_expect_success 'blame -L /RE/ (relative: adjacent)' '
|
||||
check_count -L1,1 -L/dog/,+1 A 1 E 1
|
||||
check_count -L1,1 -L/\;*dog/,+1 A 1 E 1
|
||||
'
|
||||
|
||||
test_expect_success 'blame -L /RE/ (relative: not found)' '
|
||||
test_must_fail $PROG -L4,4 -L/dog/ file
|
||||
test_must_fail $PROG -L4,4 -L/\;*dog/ file
|
||||
'
|
||||
|
||||
test_expect_success 'blame -L /RE/ (relative: end-of-file)' '
|
||||
@@ -380,11 +380,11 @@ test_expect_success 'blame -L /RE/ (relative: end-of-file)' '
|
||||
'
|
||||
|
||||
test_expect_success 'blame -L ^/RE/ (absolute)' '
|
||||
check_count -L3,3 -L^/dog/,+2 A 1 B2 1
|
||||
check_count -L3,3 -L^/\;*dog/,+2 A 1 B2 1
|
||||
'
|
||||
|
||||
test_expect_success 'blame -L ^/RE/ (absolute: no preceding range)' '
|
||||
check_count -L^/dog/,+2 A 1 B2 1
|
||||
check_count -L^/\;*dog/,+2 A 1 B2 1
|
||||
'
|
||||
|
||||
test_expect_success 'blame -L ^/RE/ (absolute: not found)' '
|
||||
|
||||
@@ -214,7 +214,7 @@ test_expect_success 'filter that does not read is fine' '
|
||||
test_cmp expect actual
|
||||
'
|
||||
|
||||
test_expect_success EXPENSIVE 'filter large file' '
|
||||
test_expect_success EXPENSIVE,!MINGW 'filter large file' '
|
||||
git config filter.largefile.smudge cat &&
|
||||
git config filter.largefile.clean cat &&
|
||||
for i in $(test_seq 1 2048); do printf "%1048576d" 1; done >2GB &&
|
||||
|
||||
@@ -4,9 +4,9 @@ test_description='CRLF conversion all combinations'
|
||||
|
||||
. ./test-lib.sh
|
||||
|
||||
if ! test_have_prereq EXPENSIVE
|
||||
if ! test_have_prereq EXPENSIVE && ! test_have_prereq MINGW
|
||||
then
|
||||
skip_all="EXPENSIVE not set"
|
||||
skip_all="Neither EXPENSIVE nor MINGW set"
|
||||
test_done
|
||||
fi
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ helper_test store
|
||||
unset XDG_CONFIG_HOME
|
||||
|
||||
test_expect_success 'if custom xdg file exists, home and xdg files not created' '
|
||||
test_when_finished "rm -f $HOME/xdg/git/credentials" &&
|
||||
test_when_finished "rm -f \"$HOME/xdg/git/credentials\"" &&
|
||||
test -s "$HOME/xdg/git/credentials" &&
|
||||
test_path_is_missing "$HOME/.git-credentials" &&
|
||||
test_path_is_missing "$HOME/.config/git/credentials"
|
||||
|
||||
@@ -339,6 +339,10 @@ test_expect_success 'make_relative_path handles double slashes in GIT_DIR' '
|
||||
git --git-dir="$(pwd)//repo.git" --work-tree="$(pwd)" add dummy_file
|
||||
'
|
||||
|
||||
test_have_prereq MINGW &&
|
||||
# make sure to test DOS path on Windows
|
||||
TRASH_DIRECTORY="$(cd "$TRASH_DIRECTORY" && pwd)"
|
||||
|
||||
test_expect_success 'relative $GIT_WORK_TREE and git subprocesses' '
|
||||
GIT_DIR=repo.git GIT_WORK_TREE=repo.git/work \
|
||||
test-subprocess --setup-work-tree rev-parse --show-toplevel >actual &&
|
||||
|
||||
@@ -40,7 +40,7 @@ test_expect_success 'UTF-16 refused because of NULs' '
|
||||
'
|
||||
|
||||
test_expect_success 'UTF-8 invalid characters refused' '
|
||||
test_when_finished "rm -f $HOME/stderr $HOME/invalid" &&
|
||||
test_when_finished "rm -f \"$HOME/stderr $HOME/invalid\"" &&
|
||||
echo "UTF-8 characters" >F &&
|
||||
printf "Commit message\n\nInvalid surrogate:\355\240\200\n" \
|
||||
>"$HOME/invalid" &&
|
||||
@@ -49,7 +49,7 @@ test_expect_success 'UTF-8 invalid characters refused' '
|
||||
'
|
||||
|
||||
test_expect_success 'UTF-8 overlong sequences rejected' '
|
||||
test_when_finished "rm -f $HOME/stderr $HOME/invalid" &&
|
||||
test_when_finished "rm -f \"$HOME/stderr $HOME/invalid\"" &&
|
||||
rm -f "$HOME/stderr" "$HOME/invalid" &&
|
||||
echo "UTF-8 overlong" >F &&
|
||||
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' '
|
||||
'
|
||||
|
||||
test_expect_success 'UTF-8 non-characters refused' '
|
||||
test_when_finished "rm -f $HOME/stderr $HOME/invalid" &&
|
||||
test_when_finished "rm -f \"$HOME/stderr $HOME/invalid\"" &&
|
||||
echo "UTF-8 non-character 1" >F &&
|
||||
printf "Commit message\n\nNon-character:\364\217\277\276\n" \
|
||||
>"$HOME/invalid" &&
|
||||
@@ -68,7 +68,7 @@ test_expect_success 'UTF-8 non-characters refused' '
|
||||
'
|
||||
|
||||
test_expect_success 'UTF-8 non-characters refused' '
|
||||
test_when_finished "rm -f $HOME/stderr $HOME/invalid" &&
|
||||
test_when_finished "rm -f \"$HOME/stderr $HOME/invalid\"" &&
|
||||
echo "UTF-8 non-character 2." >F &&
|
||||
printf "Commit message\n\nNon-character:\357\267\220\n" \
|
||||
>"$HOME/invalid" &&
|
||||
|
||||
@@ -52,7 +52,7 @@ get_needs () {
|
||||
' "$1"
|
||||
}
|
||||
|
||||
test_expect_success 'fetch A (new commit : 1 connection)' '
|
||||
test_expect_failure 'fetch A (new commit : 1 connection)' ' # TODO known breakage
|
||||
rm -f $U &&
|
||||
(
|
||||
cd cloned &&
|
||||
@@ -82,7 +82,7 @@ want $T
|
||||
EOF
|
||||
'
|
||||
|
||||
test_expect_success 'fetch C, T (new branch, tag : 1 connection)' '
|
||||
test_expect_failure 'fetch C, T (new branch, tag : 1 connection)' ' # TODO known breakage
|
||||
rm -f $U &&
|
||||
(
|
||||
cd cloned &&
|
||||
@@ -118,7 +118,7 @@ want $S
|
||||
EOF
|
||||
'
|
||||
|
||||
test_expect_success 'fetch B, S (commit and tag : 1 connection)' '
|
||||
test_expect_failure 'fetch B, S (commit and tag : 1 connection)' ' # TODO known breakage
|
||||
rm -f $U &&
|
||||
(
|
||||
cd cloned &&
|
||||
|
||||
@@ -308,7 +308,7 @@ test_expect_success 'git mv moves a submodule with a .git directory and no .gitm
|
||||
(
|
||||
cd sub &&
|
||||
rm -f .git &&
|
||||
cp -R -P -p ../.git/modules/sub .git &&
|
||||
cp -a ../.git/modules/sub .git &&
|
||||
GIT_WORK_TREE=. git config --unset core.worktree
|
||||
) &&
|
||||
mkdir mod &&
|
||||
@@ -331,7 +331,7 @@ test_expect_success 'git mv moves a submodule with a .git directory and .gitmodu
|
||||
(
|
||||
cd sub &&
|
||||
rm -f .git &&
|
||||
cp -R -P -p ../.git/modules/sub .git &&
|
||||
cp -a ../.git/modules/sub .git &&
|
||||
GIT_WORK_TREE=. git config --unset core.worktree
|
||||
) &&
|
||||
mkdir mod &&
|
||||
|
||||
@@ -12,6 +12,12 @@ then
|
||||
test_done
|
||||
fi
|
||||
|
||||
if test_have_prereq MINGW
|
||||
then
|
||||
skip_all='skipping remote-svn tests for lack of POSIX'
|
||||
test_done
|
||||
fi
|
||||
|
||||
# Override svnrdump with our simulator
|
||||
PATH="$HOME:$PATH"
|
||||
export PATH PYTHON_PATH GIT_BUILD_DIR
|
||||
|
||||
@@ -522,4 +522,15 @@ test_expect_success 'delete refspec' '
|
||||
test_cmp expected actual
|
||||
'
|
||||
|
||||
cat > expected << EOF
|
||||
reset refs/heads/master
|
||||
from $(git rev-parse master)
|
||||
|
||||
EOF
|
||||
|
||||
test_expect_failure 'refs are updated even if no commits need to be exported' '
|
||||
git fast-export master..master > actual &&
|
||||
test_cmp expected actual
|
||||
'
|
||||
|
||||
test_done
|
||||
|
||||
Reference in New Issue
Block a user