author | Thomas Rast <trast@student.ethz.ch> | |
Mon, 29 Aug 2011 20:10:46 +0000 (22:10 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 29 Aug 2011 22:27:01 +0000 (15:27 -0700) | ||
commit | cc663d141a2d900d097973a8fdcb939f697d46bd | |
tree | b544cf66a62d8c7fc7c2e26b1f269fcfef9cbe23 | tree | snapshot |
parent | e7af8e49cd54f1784fa2a0e382f22ca2f98cf4d8 | commit | diff |
t4014: check for empty files from git format-patch --stdout
Most kinds of failure in 'git format-patch --stdout >output' will
result in an empty 'output'. This slips past checks that only verify
absence of output, such as the '! grep ...' that are quite prevalent
in t4014.
Introduce a helper check_patch() that checks that at least From, Date
and Subject are present, thus making sure it looks vaguely like a
patch (or cover letter) email. Then insert calls to it in all tests
that do have positive checks for content.
This makes two of the tests fail. Mark them as such; they'll be
fixed in a moment.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Most kinds of failure in 'git format-patch --stdout >output' will
result in an empty 'output'. This slips past checks that only verify
absence of output, such as the '! grep ...' that are quite prevalent
in t4014.
Introduce a helper check_patch() that checks that at least From, Date
and Subject are present, thus making sure it looks vaguely like a
patch (or cover letter) email. Then insert calls to it in all tests
that do have positive checks for content.
This makes two of the tests fail. Mark them as such; they'll be
fixed in a moment.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4014-format-patch.sh | diff | blob | history |