@matheusbsbs / matheus-bagliano / commits / ca02ad3447
Fork 0

Side-step sed line-ending "corruption" leading to t6038 failure.

By default, MSYS sed throws away CR from CRLF line-endings. Tests t6038.5 and t6038.6 employ sed to normalize conflict output of git-merge for validation purposes. These tests expect CRLF line-endings to be present in the normalized output of git-merge, and thus fail when sed undesirably removes CR. Fix by employing sed's -b/--binary switch to suppress its default behavior of dropping CR characters. Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

Eric Sunshine committed Sep 17, 2010 at 09:16 UTC ca02ad3447efdbd4cb2aa9ba0ee3fc6124035274
1 file changed +3 -1
t/t6038-merge-text-auto.sh
+3 -1
@@ -14,6 +14,8 @@ test_description='CRLF merge conflict across text=auto change
14
15 . ./test-lib.sh
16
17 +test_have_prereq MINGW && SED_OPTIONS=-b
18 +
19 test_expect_success setup '
20 git config core.autocrlf false &&
21
@@ -60,7 +62,7 @@ test_expect_success setup '
62
63 test_expect_success 'set up fuzz_conflict() helper' '
64 fuzz_conflict() {
63 - sed -e "s/^\([<>=]......\) .*/\1/" "$@"
65 + sed $SED_OPTIONS -e "s/^\([<>=]......\) .*/\1/" "$@"
66 }
67 '
68