[PATCH] test: reset test_subtest_known_broken_ after each success/failure.
Dmitry Kurochkin
dmitry.kurochkin at gmail.com
Tue Sep 13 03:19:36 PDT 2011
On Mon, 12 Sep 2011 23:41:54 -0300, david at tethera.net wrote:
> From: David Bremner <bremner at debian.org>
>
> This means that test_subtest_known_broken needs to be called before
> every known broken subtest, which is no different than what is
> documented for the test_begin_subtest case.
>
> The assumption is that every test ends up calling either skipping,
> calling test_ok_ or test_failure_ and and the latter in turn delegate
> to the known_broken versions in the case where
> test_subtest_known_broken_ is set.
Looks good to me.
Regards,
Dmitry
> ---
> test/test-lib.sh | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/test/test-lib.sh b/test/test-lib.sh
> index 196ef49..966b2dc 100755
> --- a/test/test-lib.sh
> +++ b/test/test-lib.sh
> @@ -574,12 +574,14 @@ test_failure_message_ () {
> }
>
> test_known_broken_ok_ () {
> + test_subtest_known_broken_=
> test_fixed=$(($test_fixed+1))
> say_color pass "%-6s" "FIXED"
> echo " $@"
> }
>
> test_known_broken_failure_ () {
> + test_subtest_known_broken_=
> test_broken=$(($test_broken+1))
> test_failure_message_ "BROKEN" "$@"
> }
> @@ -614,6 +616,7 @@ test_skip () {
> fi
> case "$to_skip" in
> t)
> + test_subtest_known_broken_=
> say_color skip >&3 "skipping test: $@"
> say_color skip "%-6s" "SKIP"
> echo " $1"
> --
> 1.7.5.4
>
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
More information about the notmuch
mailing list