git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 10/14] t6038-*.sh: Pass the -b (--binary) option to sed on cygwin

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Dec 14, 2010, 18:32 UTC
Message-ID
<4D07B82C.2060701@ramsay1.demon.co.uk>

The tests using the fuzz_conflict helper function (tests 5-6) fail on cygwin in the same way they used to on MinGW, prior to commit ca02ad3. The solution is also the same; passing the -b (--binary) option to sed, using the SED_OPTIONS variable. We introduce a new prerequisite SED_STRIPS_CR to use in the conditional initialisation of SED_OPTIONS, rather than MINGW. The new prerequisite is set in test-lib.sh for both MinGW and Cygwin.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
 t/t6038-merge-text-auto.sh |    2 +-
 t/test-lib.sh              |    8 ++++++++
 2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/t/t6038-merge-text-auto.sh b/t/t6038-merge-text-auto.sh
index 460bf74..d9c2d38 100755
--- a/t/t6038-merge-text-auto.sh
+++ b/t/t6038-merge-text-auto.sh
@@ -14,7 +14,7 @@ test_description='CRLF merge conflict across text=auto change
 
 . ./test-lib.sh
 
-test_have_prereq MINGW && SED_OPTIONS=-b
+test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b
 
 test_expect_success setup '
 	git config core.autocrlf false &&
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 48fa516..9e74357 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1057,6 +1057,14 @@ case $(uname -s) in
 	# backslashes in pathspec are converted to '/'
 	# exec does not inherit the PID
 	test_set_prereq MINGW
+	test_set_prereq SED_STRIPS_CR
+	;;
+*CYGWIN*)
+	test_set_prereq POSIXPERM
+	test_set_prereq BSLASHPSPEC
+	test_set_prereq EXECKEEPSPID
+	test_set_prereq NOT_MINGW
+	test_set_prereq SED_STRIPS_CR
 	;;
 *)
 	test_set_prereq POSIXPERM
-- 
1.7.3
Message 1 of 1 in “t6038-*.sh: Pass the -b (--binary) option to sed on cygwin”
  1. 10/14 t6038-*.sh: Pass the -b (--binary) option to sed on cygwinRamsay Jones, Dec 14, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.