Merge branch 'da/mergetool-xxdiff-hotkey'
[gitweb.git] / t / t0020-crlf.sh
index f94120a8940a37c48fbb97abd85002da95e3abe9..71350e0657986d7b3e38801d82058c53f9fd23d0 100755 (executable)
@@ -83,7 +83,11 @@ test_expect_success 'safecrlf: print warning only once' '
        git add doublewarn &&
        git commit -m "nowarn" &&
        for w in Oh here is CRLFQ in text; do echo $w; done | q_to_cr >doublewarn &&
-       test $(git add doublewarn 2>&1 | grep "CRLF will be replaced by LF" | wc -l) = 1
+       git add doublewarn 2>err &&
+       if test_have_prereq C_LOCALE_OUTPUT
+       then
+               test $(grep "CRLF will be replaced by LF" err | wc -l) = 1
+       fi
 '