[PATCH v8 8/9] test-lib-functions.sh: Add lf_to_nul
From: Jeff Hostetler <jeffhost@microsoft.com>
Add lf_to_nul() function to test-lib-functions.
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
---
t/test-lib-functions.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index 4f7eadb..fdaeb3a 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/'
}
--
2.8.0.rc4.17.gac42084.dirty