Skip to content

Commit

Permalink
Move the test for ok(1, "") into the TAP formatter tests.
Browse files Browse the repository at this point in the history
For #84
  • Loading branch information
schwern committed Nov 10, 2011
1 parent 20e19ec commit d581aa0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
6 changes: 2 additions & 4 deletions t/Builder/output.t
Expand Up @@ -77,24 +77,22 @@ END { 1 while unlink($tmpfile) }
my $out = $tb->output(\$fakeout);
$tb->exported_to(__PACKAGE__);
$tb->no_ending(1);
$tb->plan(tests => 6);
$tb->plan(tests => 5);

$tb->ok(1, "ok");
$tb->ok(1, "ok\n");
$tb->ok(1, "ok, like\nok");
$tb->skip("wibble\nmoof");
$tb->todo_skip("todo\nskip\n");
$tb->ok(1, "");

is( $fakeout, <<'OUTPUT' );
TAP version 13
1..6
1..5
ok 1 - ok
ok 2 - ok\n
ok 3 - ok, like\nok
ok 4 # SKIP wibble\nmoof
not ok 5 # TODO SKIP todo\nskip\n
ok 6 -
OUTPUT
}

Expand Down
11 changes: 11 additions & 0 deletions t/Formatter/TAP/basic.t
Expand Up @@ -301,4 +301,15 @@ OUT
}


note "Name with an empty string (github #84)"; {
my $result = Test::Builder2::Result->new_result(
pass => 1,
test_number => 99,
name => ''
);

$ec->post_event($result);
is(last_output, "ok 99 - \n", "empty string name preserved");
}

done_testing();

0 comments on commit d581aa0

Please sign in to comment.