tests: consolidate CR removal/addition functions
commitc4f3f551a61e138f8ace9523d6b16aff37b30302
authorStephen Boyd <bebarino@gmail.com>
Tue, 26 Jan 2010 00:33:57 +0000 (25 16:33 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 26 Jan 2010 00:42:23 +0000 (25 16:42 -0800)
tree839c322653b2f465367f433b8cdca1e51af99081
parent2d7f98bac7e1d8b42c558e179ea24f5b06512622
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 <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0020-crlf.sh
t/t3400-rebase.sh
t/t4012-diff-binary.sh
t/t6033-merge-crlf.sh
t/t9401-git-cvsserver-crlf.sh
t/test-lib.sh