Skip to content

Commit

Permalink
t6038-*.sh: Pass the -b (--binary) option to sed on cygwin
Browse files Browse the repository at this point in the history
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>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Ramsay Jones authored and Junio C Hamano committed Jan 9, 2011
1 parent 0137ef7 commit a31d066
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion t/t6038-merge-text-auto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down
8 changes: 8 additions & 0 deletions t/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a31d066

Please sign in to comment.