Skip to content

Commit 74615c2

Browse files
Beat Bolligitster
authored andcommitted
t/t0*: avoid redundant uses of cat
Signed-off-by: Beat Bolli <[email protected]> Acked-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 108e18a commit 74615c2

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

t/t0002-gitfile.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ test_expect_success 'final setup + check rev-parse --git-dir' '
4040

4141
test_expect_success 'check hash-object' '
4242
echo "foo" >bar &&
43-
SHA=$(cat bar | git hash-object -w --stdin) &&
43+
SHA=$(git hash-object -w --stdin <bar) &&
4444
test_path_is_file "$REAL/objects/$(objpath $SHA)"
4545
'
4646

t/t0011-hashmap.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ test_expect_success 'grow / shrink' '
239239
echo value40 >> expect &&
240240
echo size >> in &&
241241
echo 64 39 >> expect &&
242-
cat in | test-tool hashmap > out &&
242+
test-tool hashmap <in >out &&
243243
test_cmp expect out
244244
245245
'

t/t0028-working-tree-encoding.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ do
131131
test_when_finished "rm -f crlf.utf${i}.raw lf.utf${i}.raw" &&
132132
test_when_finished "git reset --hard HEAD^" &&
133133
134-
cat lf.utf8.raw | write_utf${i} >lf.utf${i}.raw &&
135-
cat crlf.utf8.raw | write_utf${i} >crlf.utf${i}.raw &&
134+
write_utf${i} <lf.utf8.raw >lf.utf${i}.raw &&
135+
write_utf${i} <crlf.utf8.raw >crlf.utf${i}.raw &&
136136
cp crlf.utf${i}.raw eol.utf${i} &&
137137
138138
cat >expectIndexLF <<-EOF &&

t/t0204-gettext-reencode-sanity.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ test_expect_success GETTEXT_ISO_LOCALE 'gettext.c: git init UTF-8 -> ISO-8859-1'
8282
printf "Bjó til tóma Git lind" >expect &&
8383
LANGUAGE=is LC_ALL="$is_IS_iso_locale" git init repo >actual &&
8484
test_when_finished "rm -rf repo" &&
85-
grep "^$(cat expect | iconv -f UTF-8 -t ISO8859-1) " actual
85+
grep "^$(iconv -f UTF-8 -t ISO8859-1 <expect) " actual
8686
'
8787

8888
test_done

0 commit comments

Comments
 (0)