Skip to content

Commit 9b3995c

Browse files
committed
Merge branch 'rs/test-remove-useless-debugging-cat'
Code cleanup. * rs/test-remove-useless-debugging-cat: tests: remove "cat foo" before "test_i18ngrep bar foo"
2 parents 2e956f7 + f537485 commit 9b3995c

File tree

4 files changed

+0
-32
lines changed

4 files changed

+0
-32
lines changed

t/t1450-fsck.sh

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,13 @@ test_expect_success 'object with bad sha1' '
7070
test_when_finished "git update-ref -d refs/heads/bogus" &&
7171
7272
test_must_fail git fsck 2>out &&
73-
cat out &&
7473
test_i18ngrep "$sha.*corrupt" out
7574
'
7675

7776
test_expect_success 'branch pointing to non-commit' '
7877
git rev-parse HEAD^{tree} >.git/refs/heads/invalid &&
7978
test_when_finished "git update-ref -d refs/heads/invalid" &&
8079
test_must_fail git fsck 2>out &&
81-
cat out &&
8280
test_i18ngrep "not a commit" out
8381
'
8482

@@ -88,7 +86,6 @@ test_expect_success 'HEAD link pointing at a funny object' '
8886
echo $ZERO_OID >.git/HEAD &&
8987
# avoid corrupt/broken HEAD from interfering with repo discovery
9088
test_must_fail env GIT_DIR=.git git fsck 2>out &&
91-
cat out &&
9289
test_i18ngrep "detached HEAD points" out
9390
'
9491

@@ -98,7 +95,6 @@ test_expect_success 'HEAD link pointing at a funny place' '
9895
echo "ref: refs/funny/place" >.git/HEAD &&
9996
# avoid corrupt/broken HEAD from interfering with repo discovery
10097
test_must_fail env GIT_DIR=.git git fsck 2>out &&
101-
cat out &&
10298
test_i18ngrep "HEAD points to something strange" out
10399
'
104100

@@ -157,7 +153,6 @@ test_expect_success 'email with embedded > is not okay' '
157153
git update-ref refs/heads/bogus "$new" &&
158154
test_when_finished "git update-ref -d refs/heads/bogus" &&
159155
test_must_fail git fsck 2>out &&
160-
cat out &&
161156
test_i18ngrep "error in commit $new" out
162157
'
163158

@@ -169,7 +164,6 @@ test_expect_success 'missing < email delimiter is reported nicely' '
169164
git update-ref refs/heads/bogus "$new" &&
170165
test_when_finished "git update-ref -d refs/heads/bogus" &&
171166
test_must_fail git fsck 2>out &&
172-
cat out &&
173167
test_i18ngrep "error in commit $new.* - bad name" out
174168
'
175169

@@ -181,7 +175,6 @@ test_expect_success 'missing email is reported nicely' '
181175
git update-ref refs/heads/bogus "$new" &&
182176
test_when_finished "git update-ref -d refs/heads/bogus" &&
183177
test_must_fail git fsck 2>out &&
184-
cat out &&
185178
test_i18ngrep "error in commit $new.* - missing email" out
186179
'
187180

@@ -193,7 +186,6 @@ test_expect_success '> in name is reported' '
193186
git update-ref refs/heads/bogus "$new" &&
194187
test_when_finished "git update-ref -d refs/heads/bogus" &&
195188
test_must_fail git fsck 2>out &&
196-
cat out &&
197189
test_i18ngrep "error in commit $new" out
198190
'
199191

@@ -207,7 +199,6 @@ test_expect_success 'integer overflow in timestamps is reported' '
207199
git update-ref refs/heads/bogus "$new" &&
208200
test_when_finished "git update-ref -d refs/heads/bogus" &&
209201
test_must_fail git fsck 2>out &&
210-
cat out &&
211202
test_i18ngrep "error in commit $new.*integer overflow" out
212203
'
213204

@@ -219,7 +210,6 @@ test_expect_success 'commit with NUL in header' '
219210
git update-ref refs/heads/bogus "$new" &&
220211
test_when_finished "git update-ref -d refs/heads/bogus" &&
221212
test_must_fail git fsck 2>out &&
222-
cat out &&
223213
test_i18ngrep "error in commit $new.*unterminated header: NUL at offset" out
224214
'
225215

@@ -297,7 +287,6 @@ test_expect_success 'tag pointing to nonexistent' '
297287
echo $tag >.git/refs/tags/invalid &&
298288
test_when_finished "git update-ref -d refs/tags/invalid" &&
299289
test_must_fail git fsck --tags >out &&
300-
cat out &&
301290
test_i18ngrep "broken link" out
302291
'
303292

@@ -378,7 +367,6 @@ test_expect_success 'tag with NUL in header' '
378367
echo $tag >.git/refs/tags/wrong &&
379368
test_when_finished "git update-ref -d refs/tags/wrong" &&
380369
test_must_fail git fsck --tags 2>out &&
381-
cat out &&
382370
test_i18ngrep "error in tag $tag.*unterminated header: NUL at offset" out
383371
'
384372

@@ -409,7 +397,6 @@ test_expect_success 'rev-list --verify-objects with bad sha1' '
409397
test_when_finished "git update-ref -d refs/heads/bogus" &&
410398
411399
test_might_fail git rev-list --verify-objects refs/heads/bogus >/dev/null 2>out &&
412-
cat out &&
413400
test_i18ngrep -q "error: hash mismatch $(dirname $new)$(test_oid ff_2)" out
414401
'
415402

@@ -433,7 +420,6 @@ test_expect_success 'fsck notices blob entry pointing to null sha1' '
433420
sha=$(printf "100644 file$_bz$_bzoid" |
434421
git hash-object -w --stdin -t tree) &&
435422
git fsck 2>out &&
436-
cat out &&
437423
test_i18ngrep "warning.*null sha1" out
438424
)
439425
'
@@ -444,7 +430,6 @@ test_expect_success 'fsck notices submodule entry pointing to null sha1' '
444430
sha=$(printf "160000 submodule$_bz$_bzoid" |
445431
git hash-object -w --stdin -t tree) &&
446432
git fsck 2>out &&
447-
cat out &&
448433
test_i18ngrep "warning.*null sha1" out
449434
)
450435
'
@@ -465,7 +450,6 @@ while read name path pretty; do
465450
printf "$mode $type %s\t%s" "$value" "$path" >bad &&
466451
bad_tree=$(git mktree <bad) &&
467452
git fsck 2>out &&
468-
cat out &&
469453
test_i18ngrep "warning.*tree $bad_tree" out
470454
)'
471455
done <<-\EOF

t/t5801-remote-helpers.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ clean_mark () {
247247
test_expect_success 'proper failure checks for fetching' '
248248
(cd local &&
249249
test_must_fail env GIT_REMOTE_TESTGIT_FAILURE=1 git fetch 2>error &&
250-
cat error &&
251250
test_i18ngrep -q "error while running fast-import" error
252251
)
253252
'

t/t7400-submodule-basic.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,6 @@ test_expect_success 'update --init' '
527527
test_must_fail git config submodule.example.url &&
528528
529529
git submodule update init 2> update.out &&
530-
cat update.out &&
531530
test_i18ngrep "not initialized" update.out &&
532531
test_must_fail git rev-parse --resolve-git-dir init/.git &&
533532
@@ -545,7 +544,6 @@ test_expect_success 'update --init from subdirectory' '
545544
(
546545
cd sub &&
547546
git submodule update ../init 2>update.out &&
548-
cat update.out &&
549547
test_i18ngrep "not initialized" update.out &&
550548
test_must_fail git rev-parse --resolve-git-dir ../init/.git &&
551549

t/t9300-fast-import.sh

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2781,7 +2781,6 @@ test_expect_success 'S: filemodify with garbage after mark must fail' '
27812781
COMMIT
27822782
M 100644 :403x hello.c
27832783
EOF
2784-
cat err &&
27852784
test_i18ngrep "space after mark" err
27862785
'
27872786

@@ -2798,7 +2797,6 @@ test_expect_success 'S: filemodify with garbage after inline must fail' '
27982797
inline
27992798
BLOB
28002799
EOF
2801-
cat err &&
28022800
test_i18ngrep "nvalid dataref" err
28032801
'
28042802

@@ -2812,7 +2810,6 @@ test_expect_success 'S: filemodify with garbage after sha1 must fail' '
28122810
COMMIT
28132811
M 100644 ${sha1}x hello.c
28142812
EOF
2815-
cat err &&
28162813
test_i18ngrep "space after SHA1" err
28172814
'
28182815

@@ -2828,7 +2825,6 @@ test_expect_success 'S: notemodify with garbage after mark dataref must fail' '
28282825
COMMIT
28292826
N :202x :302
28302827
EOF
2831-
cat err &&
28322828
test_i18ngrep "space after mark" err
28332829
'
28342830

@@ -2844,7 +2840,6 @@ test_expect_success 'S: notemodify with garbage after inline dataref must fail'
28442840
note blob
28452841
BLOB
28462842
EOF
2847-
cat err &&
28482843
test_i18ngrep "nvalid dataref" err
28492844
'
28502845

@@ -2858,7 +2853,6 @@ test_expect_success 'S: notemodify with garbage after sha1 dataref must fail' '
28582853
COMMIT
28592854
N ${sha1}x :302
28602855
EOF
2861-
cat err &&
28622856
test_i18ngrep "space after SHA1" err
28632857
'
28642858

@@ -2874,7 +2868,6 @@ test_expect_success 'S: notemodify with garbage after mark commit-ish must fail'
28742868
COMMIT
28752869
N :202 :302x
28762870
EOF
2877-
cat err &&
28782871
test_i18ngrep "after mark" err
28792872
'
28802873

@@ -2908,7 +2901,6 @@ test_expect_success 'S: from with garbage after mark must fail' '
29082901
EOF
29092902
29102903
# now evaluate the error
2911-
cat err &&
29122904
test_i18ngrep "after mark" err
29132905
'
29142906

@@ -2928,7 +2920,6 @@ test_expect_success 'S: merge with garbage after mark must fail' '
29282920
merge :303x
29292921
M 100644 :403 hello.c
29302922
EOF
2931-
cat err &&
29322923
test_i18ngrep "after mark" err
29332924
'
29342925

@@ -2944,7 +2935,6 @@ test_expect_success 'S: tag with garbage after mark must fail' '
29442935
tag S
29452936
TAG
29462937
EOF
2947-
cat err &&
29482938
test_i18ngrep "after mark" err
29492939
'
29502940

@@ -2955,7 +2945,6 @@ test_expect_success 'S: cat-blob with garbage after mark must fail' '
29552945
test_must_fail git fast-import --import-marks=marks <<-EOF 2>err &&
29562946
cat-blob :403x
29572947
EOF
2958-
cat err &&
29592948
test_i18ngrep "after mark" err
29602949
'
29612950

@@ -2966,7 +2955,6 @@ test_expect_success 'S: ls with garbage after mark must fail' '
29662955
test_must_fail git fast-import --import-marks=marks <<-EOF 2>err &&
29672956
ls :302x hello.c
29682957
EOF
2969-
cat err &&
29702958
test_i18ngrep "space after mark" err
29712959
'
29722960

@@ -2975,7 +2963,6 @@ test_expect_success 'S: ls with garbage after sha1 must fail' '
29752963
test_must_fail git fast-import --import-marks=marks <<-EOF 2>err &&
29762964
ls ${sha1}x hello.c
29772965
EOF
2978-
cat err &&
29792966
test_i18ngrep "space after tree-ish" err
29802967
'
29812968

0 commit comments

Comments
 (0)