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

Commit

Permalink
fixup! Merge pull request #156 from kasal/test-fix-rev
Browse files Browse the repository at this point in the history
This reverts commit e42bb07, reversing
changes made to 648a344.

These changes will be obsoleted by the 'win-tests-rebase' branch.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Apr 11, 2014
1 parent 4b41a9f commit f9f2084
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
8 changes: 3 additions & 5 deletions t/t4041-diff-submodule-option.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This test tries to verify the sanity of the --submodule option of git diff.

# String "added" in German (translated with Google Translate), encoded in UTF-8,
# used in sample commit log messages in add_file() function below.
added=$(printf "hinzugef\303\274gt")
added=$(printf "hinzugef\303\274gt" | iconv -t utf-8)
add_file () {
(
cd "$1" &&
Expand All @@ -23,10 +23,8 @@ add_file () {
echo "$name" >"$name" &&
git add "$name" &&
test_tick &&
# "git commit -m" would break MinGW, as Windows refuse to pass
# iso8859-1 encoded parameter to git.
echo "Add $name ($added $name)" | iconv -f utf-8 -t iso8859-1 |
git -c 'i18n.commitEncoding=iso8859-1' commit -F -
msg_added_iso88591=$(echo "Add $name ($added $name)" | iconv -f utf-8 -t iso8859-1) &&
git -c 'i18n.commitEncoding=iso8859-1' commit -m "$msg_added_iso88591"
done >/dev/null &&
git rev-parse --short --verify HEAD
)
Expand Down
5 changes: 2 additions & 3 deletions t/t4205-log-pretty-formats.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ test_expect_success 'set up basic repos' '
git add foo &&
test_tick &&
git config i18n.commitEncoding iso8859-1 &&
# "git commit -m" would break MinGW, as Windows refuse to pass
# iso8859-1 encoded parameter to git.
commit_msg iso8859-1 | git commit -F - &&
commit_msg iso8859-1 > commit_msg &&
git commit --file commit_msg &&
git add bar &&
test_tick &&
git commit -m "add bar" &&
Expand Down
12 changes: 4 additions & 8 deletions t/t7102-reset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ commit_msg () {
msg="modify 2nd file (ge\303\244ndert)\n"
if test -n "$1"
then
printf "$msg" | iconv -f utf-8 -t "$1"
printf "$msg" | iconv -t "$1"
else
printf "$msg"
fi
Expand All @@ -41,9 +41,7 @@ test_expect_success 'creating initial files and commits' '
echo "1st line 2nd file" >secondfile &&
echo "2nd line 2nd file" >>secondfile &&
# "git commit -m" would break MinGW, as Windows refuse to pass
# iso8859-1 encoded parameter to git.
commit_msg iso8859-1 | git -c "i18n.commitEncoding=iso8859-1" commit -a -F - &&
git -c "i18n.commitEncoding=iso8859-1" commit -a -m "$(commit_msg iso8859-1)" &&
head5=$(git rev-parse --verify HEAD)
'
# git log --pretty=oneline # to see those SHA1 involved
Expand All @@ -62,7 +60,7 @@ check_changes () {
test_expect_success 'reset --hard message' '
hex=$(git log -1 --format="%h") &&
git reset --hard > .actual &&
echo HEAD is now at $hex $(commit_msg) > .expected &&
echo HEAD is now at $hex $(commit_msg utf-8) > .expected &&
test_cmp .expected .actual
'

Expand Down Expand Up @@ -333,9 +331,7 @@ test_expect_success 'redoing the last two commits should succeed' '
echo "1st line 2nd file" >secondfile &&
echo "2nd line 2nd file" >>secondfile &&
# "git commit -m" would break MinGW, as Windows refuse to pass
# iso8859-1 encoded parameter to git.
commit_msg iso8859-1 | git -c "i18n.commitEncoding=iso8859-1" commit -a -F - &&
git -c "i18n.commitEncoding=iso8859-1" commit -a -m "$(commit_msg iso8859-1)" &&
check_changes $head5
'

Expand Down

0 comments on commit f9f2084

Please sign in to comment.