[PATCH] t0020: make sure the test file is lf to start with

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Vincent van Ravesteijn <vfr@xxxxxxx>

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@xxxxxxx>

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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]