Issue #3 resolved

Allow control to return to caller

Fabrice Gabolde
repo owner created an issue

Lembas needs a yield command that "pauses" the current Lembas run and returns control to the outer test script. This should allow users to do complex stuff in Perl that they can't do from within the test interpreter: advanced tests, calculations, etc.

E.g.

    $ ./foobar
re: Foobar v\d+\.\d+ Copyright \d{4} Louis User
# test that Foobar's history file has been created by the first run
yield
...
$lembas->run;
if (-e '~/.foobar_history') {
    # open file, run some tests on its contents
}
$lembas->resume;

yield should not generate tests.

Comments (1)

  1. Log in to comment