git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stepan Kasal <kasal@ucw.cz>
To: Karsten Blees <karsten.blees@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, Johannes Sixt <j6t@kdbg.org>,
	GIT Mailing-list <git@vger.kernel.org>,
	msysGit <msysgit@googlegroups.com>, Karsten Blees <blees@dcon.de>,
	Stepan Kasal <kasal@ucw.cz>
Subject: [PATCH 3/6] MinGW: disable legacy encoding tests
Date: Thu, 17 Jul 2014 17:37:02 +0200	[thread overview]
Message-ID: <1405611425-10009-4-git-send-email-kasal@ucw.cz> (raw)
In-Reply-To: <1405611425-10009-1-git-send-email-kasal@ucw.cz>

From: Karsten Blees <blees@dcon.de>

On Windows, all native APIs are Unicode-based. It is impossible to pass
legacy encoded byte arrays to a process via command line or environment
variables. Disable the tests that try to do so.

In t3901, most tests still work if we don't mess up the repository encoding
in setup, so don't switch to ISO-8859-1 on MinGW.

Note that i18n tests that do their encoding tricks via encoded files (such
as t3900) are not affected by this.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Stepan Kasal <kasal@ucw.cz>
---
 t/t3901-i18n-patch.sh | 19 +++++++++++--------
 t/t4201-shortlog.sh   |  6 +++---
 t/t8005-blame-i18n.sh |  8 ++++----
 3 files changed, 18 insertions(+), 15 deletions(-)

diff --git a/t/t3901-i18n-patch.sh b/t/t3901-i18n-patch.sh
index 31a5770..55c8a2f 100755
--- a/t/t3901-i18n-patch.sh
+++ b/t/t3901-i18n-patch.sh
@@ -54,10 +54,13 @@ test_expect_success setup '
 	git add yours &&
 	git commit -s -m "Second on side" &&
 
-	# the second one on the side branch is ISO-8859-1
-	git config i18n.commitencoding ISO8859-1 &&
-	# use author and committer name in ISO-8859-1 to match it.
-	. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
+	if test_have_prereq NOT_MINGW
+	then
+		# the second one on the side branch is ISO-8859-1
+		git config i18n.commitencoding ISO8859-1 &&
+		# use author and committer name in ISO-8859-1 to match it.
+		. "$TEST_DIRECTORY"/t3901-8859-1.txt
+	fi &&
 	test_tick &&
 	echo Yet another >theirs &&
 	git add theirs &&
@@ -119,7 +122,7 @@ test_expect_success 'rebase (U/L)' '
 	check_encoding 2
 '
 
-test_expect_success 'rebase (L/L)' '
+test_expect_success NOT_MINGW 'rebase (L/L)' '
 	# In this test we want ISO-8859-1 encoded commits as the result
 	git config i18n.commitencoding ISO8859-1 &&
 	git config i18n.logoutputencoding ISO8859-1 &&
@@ -131,7 +134,7 @@ test_expect_success 'rebase (L/L)' '
 	check_encoding 2 8859
 '
 
-test_expect_success 'rebase (L/U)' '
+test_expect_success NOT_MINGW 'rebase (L/U)' '
 	# This is pathological -- use UTF-8 as intermediate form
 	# to get ISO-8859-1 results.
 	git config i18n.commitencoding ISO8859-1 &&
@@ -159,7 +162,7 @@ test_expect_success 'cherry-pick(U/U)' '
 	check_encoding 3
 '
 
-test_expect_success 'cherry-pick(L/L)' '
+test_expect_success NOT_MINGW 'cherry-pick(L/L)' '
 	# Both the commitencoding and logoutputencoding is set to ISO-8859-1
 
 	git config i18n.commitencoding ISO8859-1 &&
@@ -189,7 +192,7 @@ test_expect_success 'cherry-pick(U/L)' '
 	check_encoding 3
 '
 
-test_expect_success 'cherry-pick(L/U)' '
+test_expect_success NOT_MINGW 'cherry-pick(L/U)' '
 	# Again, the commitencoding is set to ISO-8859-1 but
 	# logoutputencoding is set to UTF-8.
 
diff --git a/t/t4201-shortlog.sh b/t/t4201-shortlog.sh
index 97fcb31..565c020 100755
--- a/t/t4201-shortlog.sh
+++ b/t/t4201-shortlog.sh
@@ -93,7 +93,7 @@ test_expect_success 'output from user-defined format is re-wrapped' '
 	test_cmp expect log.predictable
 '
 
-test_expect_success 'shortlog wrapping' '
+test_expect_success NOT_MINGW 'shortlog wrapping' '
 	cat >expect <<\EOF &&
 A U Thor (5):
       Test
@@ -114,7 +114,7 @@ EOF
 	test_cmp expect out
 '
 
-test_expect_success 'shortlog from non-git directory' '
+test_expect_success NOT_MINGW 'shortlog from non-git directory' '
 	git log HEAD >log &&
 	GIT_DIR=non-existing git shortlog -w <log >out &&
 	test_cmp expect out
@@ -159,7 +159,7 @@ $DSCHO (2):
 
 EOF
 
-test_expect_success 'shortlog encoding' '
+test_expect_success NOT_MINGW 'shortlog encoding' '
 	git reset --hard "$commit" &&
 	git config --unset i18n.commitencoding &&
 	echo 2 > a1 &&
diff --git a/t/t8005-blame-i18n.sh b/t/t8005-blame-i18n.sh
index cb39055..a6e73d0 100755
--- a/t/t8005-blame-i18n.sh
+++ b/t/t8005-blame-i18n.sh
@@ -33,7 +33,7 @@ author $SJIS_NAME
 summary $SJIS_MSG
 EOF
 
-test_expect_success \
+test_expect_success NOT_MINGW \
 	'blame respects i18n.commitencoding' '
 	git blame --incremental file | \
 		egrep "^(author|summary) " > actual &&
@@ -49,7 +49,7 @@ author $EUC_JAPAN_NAME
 summary $EUC_JAPAN_MSG
 EOF
 
-test_expect_success \
+test_expect_success NOT_MINGW \
 	'blame respects i18n.logoutputencoding' '
 	git config i18n.logoutputencoding eucJP &&
 	git blame --incremental file | \
@@ -66,7 +66,7 @@ author $UTF8_NAME
 summary $UTF8_MSG
 EOF
 
-test_expect_success \
+test_expect_success NOT_MINGW \
 	'blame respects --encoding=UTF-8' '
 	git blame --incremental --encoding=UTF-8 file | \
 		egrep "^(author|summary) " > actual &&
@@ -82,7 +82,7 @@ author $UTF8_NAME
 summary $UTF8_MSG
 EOF
 
-test_expect_success \
+test_expect_success NOT_MINGW \
 	'blame respects --encoding=none' '
 	git blame --incremental --encoding=none file | \
 		egrep "^(author|summary) " > actual &&
-- 
2.0.0.9635.g0be03cb

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

  parent reply	other threads:[~2014-07-17 15:37 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-10 20:05 Topic sk/mingw-unicode-spawn-args breaks tests Johannes Sixt
2014-07-11 19:49 ` Karsten Blees
2014-07-12  7:50   ` Stepan Kasal
2014-07-15  0:21     ` Johannes Schindelin
2014-07-15 13:43     ` [PATCH 0/3] fix test suite with mingw-unicode patches Stepan Kasal
2014-07-15 13:43       ` [PATCH 1/3] Win32: Unicode file name support (except dirent) Stepan Kasal
2014-07-15 13:43       ` [PATCH 2/3] Win32: Unicode file name support (dirent) Stepan Kasal
2014-07-15 13:43       ` [PATCH 3/3] tests: do not pass iso8859-1 encoded parameter Stepan Kasal
2014-07-15 13:53       ` [PATCH 0/3] fix test suite with mingw-unicode patches Stepan Kasal
2014-07-15 18:20       ` Junio C Hamano
2014-07-15 22:52         ` Karsten Blees
2014-07-15 22:53           ` [PATCH 1/2] MinGW: fix compile error due to missing ELOOP Karsten Blees
2014-07-15 23:42             ` Jonathan Nieder
2014-07-15 23:57               ` Karsten Blees
2014-07-16 17:43             ` Junio C Hamano
2014-07-15 22:54           ` [PATCH 2/2] config: use chmod() instead of fchmod() Karsten Blees
2014-07-16  5:33             ` Johannes Sixt
2014-07-16 10:53               ` Karsten Blees
2014-07-16 22:16             ` Junio C Hamano
2014-07-17  8:57               ` Karsten Blees
2014-07-16  9:29           ` [PATCH 0/3] fix test suite with mingw-unicode patches Stepan Kasal
2014-07-16 11:01             ` Thomas Braun
2014-07-17 15:36             ` [PATCH 0/6] mingw test fixes Stepan Kasal
2014-07-17 15:37               ` [PATCH 1/6] MinGW: Skip test redirecting to fd 4 Stepan Kasal
2014-07-17 18:41                 ` Junio C Hamano
2014-07-17 20:06                   ` Johannes Schindelin
2014-07-17 20:18                   ` Karsten Blees
2014-07-17 20:38                     ` Junio C Hamano
2014-07-17 15:37               ` [PATCH 2/6] Disable t0110's high-bit test on Windows Stepan Kasal
2014-07-17 18:20                 ` Karsten Blees
2014-07-18 18:26                   ` Junio C Hamano
2014-07-19 19:37                     ` [PATCH] t0110/MinGW: skip tests that pass arbitrary bytes on the command line Karsten Blees
2014-07-21 16:41                       ` Junio C Hamano
2014-07-17 15:37               ` Stepan Kasal [this message]
2014-07-17 15:37               ` [PATCH 4/6] t4210: skip command-line encoding tests on mingw Stepan Kasal
2014-07-18  9:52                 ` Erik Faye-Lund
2014-07-21 16:59                   ` Junio C Hamano
2014-07-21 17:45                     ` Johannes Schindelin
2014-07-21 19:21                       ` Johannes Sixt
2014-07-21 20:07                     ` Junio C Hamano
2014-07-21 22:29                       ` Junio C Hamano
2014-07-21 22:39                         ` Junio C Hamano
2014-07-21 22:30                       ` [PATCH 2/2] test prerequisites: enumerate with commas Junio C Hamano
2014-07-17 15:37               ` [PATCH 5/6] t9902: mingw-specific fix for gitfile link files Stepan Kasal
2014-07-17 20:42                 ` Junio C Hamano
2014-07-17 15:37               ` [PATCH 6/6] t800[12]: work around MSys limitation Stepan Kasal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1405611425-10009-4-git-send-email-kasal@ucw.cz \
    --to=kasal@ucw.cz \
    --cc=blees@dcon.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    --cc=karsten.blees@gmail.com \
    --cc=msysgit@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).