test-lib-functions.sh: add lf_to_nul helper
Add lf_to_nul helper function to test-lib-functions. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff Hostetler committed
Aug 11, 2016 at 10:46 UTC
b249e39f9934e020e1cf5e483c3f6f84d3638b31
1 file changed
+4
t/test-lib-functions.sh
+4
@@ -81,6 +81,10 @@ test_decode_color () {
81
'
82
}
83
84
+lf_to_nul () {
85
+ perl -pe 'y/\012/\000/'
86
+}
87
+
88
nul_to_q () {
89
perl -pe 'y/\000/Q/'
90
}