petdance/scratch — Issue #136: [BUG]  Test::More doesn't support plan('no_plan')
Author: petdance
Created: 2011-11-01 04:24:58+00:00
State: open

The documentation for Test::More (runtime/parrot/library/Test/More.pir:77) says that one can specify "no_plan" as a value to the plan() function, but it doesn't appear to work:

{{{
$ cat x.t
#!./parrot

.sub 'main' :main
load_bytecode 'Test/More.pbc'

.local pmc exports, curr_namespace, test_namespace
curr_namespace = get_namespace
test_namespace = get_namespace ['Test';'More']
exports = split ' ', 'plan diag ok nok is todo'
test_namespace.'export_to'(curr_namespace, exports)

plan('no_plan')

ok(1, 'because I said so')
.end

$ prove x.t
x.t .. All 1 subtests passed

Test Summary Report
-------------------
x.t (Wstat: 0 Tests: 1 Failed: 0)
Parse errors: No plan found in TAP output
Files=1, Tests=1, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.02 cusr 0.00 csys = 0.06 CPU)
Result: FAIL
$ ./parrot x.t
ok 1 - because I said so
$
}}}