Skip to content

Commit 6d8cb22

Browse files
committed
Merge branch 'rs/test-remove-useless-debugging-cat' into next
Code cleanup. * rs/test-remove-useless-debugging-cat: tests: remove "cat foo" before "test_i18ngrep bar foo"
2 parents 4f45be7 + f537485 commit 6d8cb22

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
@@ -2818,7 +2818,6 @@ test_expect_success 'S: filemodify with garbage after mark must fail' '
28182818
COMMIT
28192819
M 100644 :403x hello.c
28202820
EOF
2821-
cat err &&
28222821
test_i18ngrep "space after mark" err
28232822
'
28242823

@@ -2835,7 +2834,6 @@ test_expect_success 'S: filemodify with garbage after inline must fail' '
28352834
inline
28362835
BLOB
28372836
EOF
2838-
cat err &&
28392837
test_i18ngrep "nvalid dataref" err
28402838
'
28412839

@@ -2849,7 +2847,6 @@ test_expect_success 'S: filemodify with garbage after sha1 must fail' '
28492847
COMMIT
28502848
M 100644 ${sha1}x hello.c
28512849
EOF
2852-
cat err &&
28532850
test_i18ngrep "space after SHA1" err
28542851
'
28552852

@@ -2865,7 +2862,6 @@ test_expect_success 'S: notemodify with garbage after mark dataref must fail' '
28652862
COMMIT
28662863
N :202x :302
28672864
EOF
2868-
cat err &&
28692865
test_i18ngrep "space after mark" err
28702866
'
28712867

@@ -2881,7 +2877,6 @@ test_expect_success 'S: notemodify with garbage after inline dataref must fail'
28812877
note blob
28822878
BLOB
28832879
EOF
2884-
cat err &&
28852880
test_i18ngrep "nvalid dataref" err
28862881
'
28872882

@@ -2895,7 +2890,6 @@ test_expect_success 'S: notemodify with garbage after sha1 dataref must fail' '
28952890
COMMIT
28962891
N ${sha1}x :302
28972892
EOF
2898-
cat err &&
28992893
test_i18ngrep "space after SHA1" err
29002894
'
29012895

@@ -2911,7 +2905,6 @@ test_expect_success 'S: notemodify with garbage after mark commit-ish must fail'
29112905
COMMIT
29122906
N :202 :302x
29132907
EOF
2914-
cat err &&
29152908
test_i18ngrep "after mark" err
29162909
'
29172910

@@ -2945,7 +2938,6 @@ test_expect_success 'S: from with garbage after mark must fail' '
29452938
EOF
29462939
29472940
# now evaluate the error
2948-
cat err &&
29492941
test_i18ngrep "after mark" err
29502942
'
29512943

@@ -2965,7 +2957,6 @@ test_expect_success 'S: merge with garbage after mark must fail' '
29652957
merge :303x
29662958
M 100644 :403 hello.c
29672959
EOF
2968-
cat err &&
29692960
test_i18ngrep "after mark" err
29702961
'
29712962

@@ -2981,7 +2972,6 @@ test_expect_success 'S: tag with garbage after mark must fail' '
29812972
tag S
29822973
TAG
29832974
EOF
2984-
cat err &&
29852975
test_i18ngrep "after mark" err
29862976
'
29872977

@@ -2992,7 +2982,6 @@ test_expect_success 'S: cat-blob with garbage after mark must fail' '
29922982
test_must_fail git fast-import --import-marks=marks <<-EOF 2>err &&
29932983
cat-blob :403x
29942984
EOF
2995-
cat err &&
29962985
test_i18ngrep "after mark" err
29972986
'
29982987

@@ -3003,7 +2992,6 @@ test_expect_success 'S: ls with garbage after mark must fail' '
30032992
test_must_fail git fast-import --import-marks=marks <<-EOF 2>err &&
30042993
ls :302x hello.c
30052994
EOF
3006-
cat err &&
30072995
test_i18ngrep "space after mark" err
30082996
'
30092997

@@ -3012,7 +3000,6 @@ test_expect_success 'S: ls with garbage after sha1 must fail' '
30123000
test_must_fail git fast-import --import-marks=marks <<-EOF 2>err &&
30133001
ls ${sha1}x hello.c
30143002
EOF
3015-
cat err &&
30163003
test_i18ngrep "space after tree-ish" err
30173004
'
30183005

0 commit comments

Comments
 (0)