diff options
author | Dmitry Kurochkin <dmitry.kurochkin@gmail.com> | 2011-07-04 08:07:20 +0400 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2011-09-10 10:13:27 -0300 |
commit | 4cc67276885990c38bc2bcc79eedbb0851e2bc8a (patch) | |
tree | ca36d0395943cc95c7b2238103e6409324ee08c5 /test/README | |
parent | 0db3a4d5be93710837962b8260420cfc5a8b968e (diff) |
test: improve known broken tests support
There is existing support for broken tests. But it is not convenient
to use. The primary issue is that we have to maintain a set of
test_expect_*_failure functions which are equivalent to the normal
test_expect_* counterparts except for what functions are called for
result reporting. The patch adds test_subtest_known_broken function
which marks a subset as broken, making the normal test_expect_*
functions behave as test_expect_*_failure. All test_expect_*_failure
functions are removed. Test_known_broken_failure_ is changed to
format details the same way as test_failure_ does.
Another benefit of this change is that the diff when a broken test is
fixed would be small and nice.
Documentation is updated accordingly.
Diffstat (limited to 'test/README')
-rw-r--r-- | test/README | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/test/README b/test/README index a245bf12..0b547480 100644 --- a/test/README +++ b/test/README @@ -132,20 +132,19 @@ library for your script to use. <script>. If it yields success, test is considered successful. <message> should state what it is testing. - test_expect_failure <message> <script> - - This is NOT the opposite of test_expect_success, but is used - to mark a test that demonstrates a known breakage. Unlike - the usual test_expect_success tests, which say "ok" on - success and "FAIL" on failure, this will say "FIXED" on - success and "still broken" on failure. Failures from these - tests won't cause -i (immediate) to stop. - test_begin_subtest <message> Set the test description message for a subsequent test_expect_equal invocation (see below). + test_subtest_known_broken + + Mark the current test as broken. Such tests are expected to fail. + Unlike the normal tests, which say "PASS" on success and "FAIL" on + failure, these will say "FIXED" on success and "BROKEN" on failure. + Failures from these tests won't cause -i (immediate) to stop. A + test must call this before any test_expect_* function. + test_expect_equal <output> <expected> This is an often-used convenience function built on top of |