git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: vfr@lyx.org
To: git@vger.kernel.org
Cc: msysgit@googlegroups.com, Vincent van Ravesteijn <vfr@lyx.org>
Subject: [PATCH] t0020: make sure the test file is lf to start with
Date: Sun, 10 Jun 2012 10:32:32 +0000	[thread overview]
Message-ID: <1339324352-7376-1-git-send-email-vfr@lyx.org> (raw)

From: Vincent van Ravesteijn <vfr@lyx.org>

On Windows, the perl interpreter used by q_to_nul also converts the
eol-style to crlf. Because the eol-style is now wrong from the beginning, the
later tests '.gitattributes says two is binary' and 'checkout with
existing .gitattributes' fail. This patch makes sure that the eol-style is
lf when the test file is setup and makes the tests to pass also on
Windows.

Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>

---
I'm not sure everyone will like this solution to fix a problem that is only present on Windows. I'd be happy to discuss a different solution. 

 t/t0020-crlf.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh
index 1a8f44c..4c41b6e 100755
--- a/t/t0020-crlf.sh
+++ b/t/t0020-crlf.sh
@@ -15,7 +15,7 @@ test_expect_success setup '
 	for w in Hello world how are you; do echo $w; done >one &&
 	mkdir dir &&
 	for w in I am very very fine thank you; do echo $w; done >dir/two &&
-	for w in Oh here is NULQin text here; do echo $w; done | q_to_nul >three &&
+	for w in Oh here is NULQin text here; do echo $w; done | q_to_nul | remove_cr >three &&
 	git add . &&
 
 	git commit -m initial &&
-- 
1.7.9.msysgit.0

             reply	other threads:[~2012-06-10 10:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-10 10:32 vfr [this message]
2012-06-10 10:47 ` [msysGit] [PATCH] t0020: make sure the test file is lf to start with Johannes Schindelin
2012-06-10 11:01   ` Vincent van Ravesteijn
2012-06-10 12:50     ` Johannes Schindelin

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=1339324352-7376-1-git-send-email-vfr@lyx.org \
    --to=vfr@lyx.org \
    --cc=git@vger.kernel.org \
    --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).