OSDN Git Service

test-lib-functions.sh: add lf_to_nul helper
authorJeff Hostetler <jeffhost@microsoft.com>
Thu, 11 Aug 2016 14:46:01 +0000 (10:46 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 11 Aug 2016 18:16:13 +0000 (11:16 -0700)
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>
t/test-lib-functions.sh

index 4f7eadb..fdaeb3a 100644 (file)
@@ -81,6 +81,10 @@ test_decode_color () {
        '
 }
 
+lf_to_nul () {
+       perl -pe 'y/\012/\000/'
+}
+
 nul_to_q () {
        perl -pe 'y/\000/Q/'
 }