Devel-Command-Tdump
view release on metacpan or search on metacpan
t/005_tdump.t view on Meta::CPAN
erase;
# tdump() expects @DB::hist to be around; we'l define it and fill it up
# with various possibilities.
# Test 0: Can't touch this.
SKIP:{
skip "Can't do unwritable file test as root", 2 unless $> != 0;
open(JUNK,">t/nowrite.file");
close JUNK;
chmod 0000, "t/nowrite.file";
Devel::Command::Tdump::command("tdump t/nowrite.file");
ok($$contents, "got a message");
like($$contents, qr/can't write history:/, "expected error");
chmod 0700, "t/nowrite.file";
unlink "t/nowrite.file";
erase;
}
foreach my $case (keys %cases_of) {
@DB::hist = @{$cases_of{$case}->{hist}};
Devel::Command::Tdump::command("tdump t/check.output");
@lines = slurp();
ok(int @lines, "Something there");
is(int @lines, $cases_of{$case}->{count}, "line count as expected");
( run in 0.343 second using v1.01-cache-2.11-cpan-8d75d55dd25 )