Skip to contentSkip to conversation

MinGW: Update tests to handle a native eol of crlf

PATCH In review Torsten Bögershausen 2 participants 5 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v3 2/2 MinGW: Update tests to handle a native eol of crlf

Integrate commit b1d07649588102 from msysgit:
MinGW: Update tests to handle a native eol of crlf

Some of the tests were written with the assumption that the native eol would always be lf. After defining NATIVE_CRLF on MinGW, these tests began failing. This change will update the tests to also handle a native eol of crlf.

On top of that, fix the broken && chain in t0026

---
 t/t0026-eol-config.sh      |  6 +++---
 t/t6038-merge-text-auto.sh | 54 +++++++++++++++++++++++++++++-----------------
 t/test-lib.sh              |  1 +
 3 files changed, 38 insertions(+), 23 deletions(-)
t/t0026-eol-config.sh +3 -3
index 43a580a..4806969 100755
@@ -84,9 +84,9 @@ test_expect_success NATIVE_CRLF 'eol native is crlf' '
 
 	rm -rf native_eol && mkdir native_eol &&
 	( cd native_eol &&
-	printf "*.txt text\n" > .gitattributes
-	printf "one\r\ntwo\r\nthree\r\n" > filedos.txt
-	printf "one\ntwo\nthree\n" > fileunix.txt
+	printf "*.txt text\n" > .gitattributes &&
+	printf "one\r\ntwo\r\nthree\r\n" > filedos.txt &&
+	printf "one\ntwo\nthree\n" > fileunix.txt &&
 	git init &&
 	git config core.autocrlf false &&
 	git config core.eol native &&
t/t6038-merge-text-auto.sh +34 -20

78 lines not on this page · raw message

t/test-lib.sh +1 -0
index b1bc65b..aceb418 100644
@@ -871,6 +871,7 @@ case $(uname -s) in
 	# exec does not inherit the PID
 	test_set_prereq MINGW
 	test_set_prereq NOT_CYGWIN
+	test_set_prereq NATIVE_CRLF
 	test_set_prereq SED_STRIPS_CR
 	test_set_prereq GREP_STRIPS_CR
 	GIT_TEST_CMP=mingw_test_cmp
Signature · 1 line
2.1.0.rc2.210.g636bceb
#1 lore raw
Quoted 7 lines · Torsten Bögershausen

Integrate commit b1d07649588102 from msysgit:
MinGW: Update tests to handle a native eol of crlf

Some of the tests were written with the assumption that the native eol would always be lf. After defining NATIVE_CRLF on MinGW, these tests began failing. This change will update the tests to also handle a native eol of crlf.

Quoted 7 lines

On top of that, fix the broken && chain in t0026

---

Should this be marked with "From: Brice Lambson <[email protected]>"?

Thanks.

#2 lore raw
Quoted 13 lines · Junio C Hamano
Quoted 11 lines · Torsten Bögershausen

Integrate commit b1d07649588102 from msysgit:
MinGW: Update tests to handle a native eol of crlf

Some of the tests were written with the assumption that the native eol would always be lf. After defining NATIVE_CRLF on MinGW, these tests began failing. This change will update the tests to also handle a native eol of crlf.

On top of that, fix the broken && chain in t0026

Quoted 7 lines
Quoted 3 lines

---

Should this be marked with "From: Brice Lambson <[email protected]>"?

Thanks.

Yes. If possible please squeeze.

#3 lore raw
Quoted 4 lines · Torsten Bögershausen
Quoted 3 lines

Should this be marked with "From: Brice Lambson <[email protected]>"?

Thanks.

Yes. If possible please squeeze.

OK, thanks. Please double check the result on 'pu' in several hours.

#4 lore raw
Quoted 9 lines · Junio C Hamano
Quoted 4 lines · Torsten Bögershausen
Quoted 3 lines

Should this be marked with "From: Brice Lambson <[email protected]>"?

Thanks.

Yes. If possible please squeeze.

OK, thanks. Please double check the result on 'pu' in several hours.

Excellent

t0027 and t0026 passed under Cygwin, MysGit and Mac OS.
(after reverting "use timer_settime() for new platforms", but that is a different story)

Many thanks for helping me out and bringing this forward.