From: Jeff Hostetler Date: Thu, 11 Aug 2016 14:46:01 +0000 (-0400) Subject: test-lib-functions.sh: add lf_to_nul helper X-Git-Tag: v2.11.0-rc0~173^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/b249e39f9934e020e1cf5e483c3f6f84d3638b31?hp=--cc test-lib-functions.sh: add lf_to_nul helper Add lf_to_nul helper function to test-lib-functions. Signed-off-by: Jeff Hostetler Signed-off-by: Junio C Hamano --- b249e39f9934e020e1cf5e483c3f6f84d3638b31 diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 4f7eadb596..fdaeb3a96b 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -81,6 +81,10 @@ test_decode_color () { ' } +lf_to_nul () { + perl -pe 'y/\012/\000/' +} + nul_to_q () { perl -pe 'y/\000/Q/' }