summaryrefslogtreecommitdiff
path: root/t/test-lib-functions.sh
diff options
context:
space:
mode:
authorJeff Hostetler <jeffhost@microsoft.com>2016-08-11 14:46:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-08-11 18:16:13 (GMT)
commitb249e39f9934e020e1cf5e483c3f6f84d3638b31 (patch)
tree6ffd87fb63d07beaef0b7d79bd922ade38811a23 /t/test-lib-functions.sh
parent1cd828ddc8a61f6bec93303f4bdbcdbf1c261cb7 (diff)
downloadgit-b249e39f9934e020e1cf5e483c3f6f84d3638b31.zip
git-b249e39f9934e020e1cf5e483c3f6f84d3638b31.tar.gz
git-b249e39f9934e020e1cf5e483c3f6f84d3638b31.tar.bz2
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>
Diffstat (limited to 't/test-lib-functions.sh')
-rw-r--r--t/test-lib-functions.sh4
1 files changed, 4 insertions, 0 deletions
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/'
}