Thread (3 messages) 3 messages, 1 author, 2016-06-15

[PATCH 3/3] t4205: remove unnecessary use of qz_to_tab_space

DORMANTno replies

From: Josef Kufner <hidden>
Date: 2016-06-15 23:06:31
Subsystem: the rest · Maintainer: Linus Torvalds

Many existing tests in this script pipes the result thru
qz_to_tab_space, but the payload does not need any Q or Z to be replaced
to tab or space. Redirect the input directly into iconv or use cat
instead.

Signed-off-by: Josef Kufner <redacted>
---
 t/t4205-log-pretty-formats.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh
index 3358837..1f191cf 100755
--- a/t/t4205-log-pretty-formats.sh
+++ b/t/t4205-log-pretty-formats.sh
@@ -299,7 +299,7 @@ EOF
 
 test_expect_success 'right alignment formatting at the nth column' '
 	git log --pretty="tformat:%h %>|(40)%s" >actual &&
-	qz_to_tab_space <<EOF >expected &&
+	cat <<EOF >expected &&
 $head1                      message two
 $head2                      message one
 $head3                          add bar
@@ -310,7 +310,7 @@ EOF
 
 test_expect_success 'right alignment formatting at the nth column. i18n.logOutputEncoding' '
 	git -c i18n.logOutputEncoding=$test_encoding log --pretty="tformat:%h %>|(40)%s" >actual &&
-	qz_to_tab_space <<EOF | iconv -f utf-8 -t $test_encoding >expected &&
+	iconv -f utf-8 -t $test_encoding <<EOF >expected &&
 $head1                      message two
 $head2                      message one
 $head3                          add bar
@@ -322,7 +322,7 @@ EOF
 # Note: Space between 'message' and 'two' should be in the same column as in previous test.
 test_expect_success 'right alignment formatting at the nth column with --graph. i18n.logOutputEncoding' '
 	git -c i18n.logOutputEncoding=$test_encoding log --graph --pretty="tformat:%h %>|(40)%s" >actual &&
-	qz_to_tab_space <<EOF | iconv -f utf-8 -t $test_encoding >expected &&
+	iconv -f utf-8 -t $test_encoding <<EOF >expected &&
 * $head1                    message two
 * $head2                    message one
 * $head3                        add bar
@@ -423,7 +423,7 @@ EOF
 old_head1=$(git rev-parse --verify HEAD~0)
 test_expect_success 'center alignment formatting with no padding. i18n.logOutputEncoding' '
 	git -c i18n.logOutputEncoding=$test_encoding log --pretty="tformat:%><(1)%s" >actual &&
-	cat <<EOF | iconv -f utf-8 -t $test_encoding >expected &&
+	iconv -f utf-8 -t $test_encoding <<EOF >expected &&
 message two
 message one
 add bar
-- 
2.5.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help