When

NAME

Test::Async::When - add :when key to plan

SYNOPSIS

Whole top suite:

use Test::Async <When Base>;
plan :when(<release>);

Or a subtest only:

use Test::Async <When Base>;
subtest "Might be skipped" => {
    plan :when(
            :all(
                :any(<release author>),
                :module<Optional::Module>));
    ...
}

}

DESCRIPTION

This bundle extends plan with additional parameter :when which defines when the suite is to be actually ran. If when condition is not fulfilled the suite is skipped. The condition is a nested combination of keys and values:

  • a string value means a name of a testing mode enabled with an environment variable. Simply put, it gets uppercased, appended with _TESTING and the resulting name is checked against %*ENV. If the string is already ending with _TESTING it is used as-is.

  • a pair with env key tests for a environment variable. The variable name is used as-is, with no manipulations done to it.

  • a pair with module key tests if a module with the given name is available

  • a pair with keys any or all basically means that either any of it subcondition or all of them are to be fulfilled

  • a pair with none key means all of its sunconditions must fail.

By default the topmost condition means any, so that the following two statements are actually check the same condition:

plan :when<release author>;
plan :when(:any<release author>);

SEE ALSO

Test::Async::Manual

AUTHOR

Vadim Belman [email protected]

Test::Async v0.0.16

Thread-safe testing framework

Authors

  • Vadim Belman

License

Artistic-2.0

Dependencies

Test Dependencies

Provides

  • Test::Async
  • Test::Async::Aggregator
  • Test::Async::Base
  • Test::Async::Decl
  • Test::Async::Event
  • Test::Async::Hub
  • Test::Async::Job
  • Test::Async::JobMgr
  • Test::Async::Metamodel::BundleClassHOW
  • Test::Async::Metamodel::BundleHOW
  • Test::Async::Metamodel::HubHOW
  • Test::Async::Metamodel::ReporterHOW
  • Test::Async::Reporter
  • Test::Async::Reporter::TAP
  • Test::Async::Result
  • Test::Async::TestTool
  • Test::Async::Utils
  • Test::Async::When
  • Test::Async::X

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.