Commit 51b74b5
t5536: simplify checking of messages output to stderr
Commit 2071e05 ("t5536: new test of refspec conflicts when
fetching", 2013-10-30), introduced the verify_stderr() function
which was used to verify that certain fatal/warning messages were
issued by a given git command. In addition, verify_stderr() would
filter a specific "fatal: The remote end hung up unexpectedly"
message, which may, or may not, be present (depending on the
relative timing of the git-fetch and git-upload-pack processes).
The verify_stderr() function has seen several modifications, which
has introduced a couple of minor problems. For example, commit
1edbaac ("tests: use test_i18n* functions to suppress false
positives", 2016-06-17) introduced an inappropriate test_i18ngrep
call and commit f096e6e ("fetch: improve the error messages
emitted for conflicting refspecs", 2013-10-30) included an
ineffective invocation of sort at the end of a grep pipeline.
Instead of fixing these minor problems in verify_stderr(), we take
the simpler approach of directly searching the error file, using
test_i18ngrep, for the specific message(s) we expect. (The only
minor downside is that we would not notice any new messages).
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent dee8b71 commit 51b74b5
1 file changed
+4
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | 21 | | |
30 | 22 | | |
31 | 23 | | |
| |||
48 | 40 | | |
49 | 41 | | |
50 | 42 | | |
51 | | - | |
52 | | - | |
53 | | - | |
| 43 | + | |
54 | 44 | | |
55 | 45 | | |
56 | 46 | | |
| |||
77 | 67 | | |
78 | 68 | | |
79 | 69 | | |
80 | | - | |
81 | | - | |
82 | | - | |
| 70 | + | |
83 | 71 | | |
84 | 72 | | |
85 | 73 | | |
| |||
90 | 78 | | |
91 | 79 | | |
92 | 80 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 81 | + | |
| 82 | + | |
97 | 83 | | |
98 | 84 | | |
99 | 85 | | |
| |||
0 commit comments