From c4f3f551a61e138f8ace9523d6b16aff37b30302 Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Mon, 25 Jan 2010 16:33:57 -0800 Subject: tests: consolidate CR removal/addition functions append_cr(), remove_cr(), q_to_nul() and q_to_cr() are defined in multiple tests. Consolidate them into test-lib.sh so we can stop redefining them. The use of remove_cr() in t0020 to test for a CR is replaced with a new function has_cr() to accurately reflect what is intended (the output of remove_cr() was being thrown away). Signed-off-by: Stephen Boyd Signed-off-by: Junio C Hamano --- t/t6033-merge-crlf.sh | 8 -------- 1 file changed, 8 deletions(-) (limited to 't/t6033-merge-crlf.sh') diff --git a/t/t6033-merge-crlf.sh b/t/t6033-merge-crlf.sh index 75d9602de4..e8d65eefb5 100755 --- a/t/t6033-merge-crlf.sh +++ b/t/t6033-merge-crlf.sh @@ -1,13 +1,5 @@ #!/bin/sh -append_cr () { - sed -e 's/$/Q/' | tr Q '\015' -} - -remove_cr () { - tr '\015' Q | sed -e 's/Q$//' -} - test_description='merge conflict in crlf repo b---M -- cgit v1.2.3