App-Sysadmin-Log-Simple
view release on metacpan or search on metacpan
inc/Devel/CheckOS.pm view on Meta::CPAN
The use-devel-assertos script
L<Module::Install::AssertOS>
=head1 AUTHOR
David Cantrell E<lt>F<david@cantrell.org.uk>E<gt>
Thanks to David Golden for the name and ideas about the interface, and
to the cpan-testers-discuss mailing list for prompting me to write it
in the first place.
Thanks to Ken Williams, from whose L<Module::Build> I lifted some of the
information about what should be in the Unix family.
Thanks to Billy Abbott for finding some bugs for me on VMS.
Thanks to Matt Kraai for information about QNX.
Thanks to Kenichi Ishigaki and Gabor Szabo for reporting a bug on Windows,
my $app = new_ok('App::Sysadmin::Log::Simple' => [
logdir => Path::Tiny->tempdir,
date => '2011/02/20',
read_from => $logentry,
]);
subtest 'log' => sub {
plan tests => 4;
my ($stdout, $stderr) = output_from { $app->run() };
like $stdout, qr/Log entry:/m, 'Got the log prompt';
like $stdout, qr/^\[UDP/m, 'UDP logger mentioned';
like $stdout, qr/^\[File/m, 'File logger mentioned';
is $stderr, '', 'No STDERR';
};
subtest 'view' => sub {
plan tests => 1;
my ($stdout, $stderr) = output_from { $app->run('view') };
like $stdout, qr/\Q$rand\E/, "$rand appeared in the log";
( run in 1.392 second using v1.01-cache-2.11-cpan-6aa56a78535 )