Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

37 lines (26 sloc) 0.754 kb
#!/usr/bin/perl -w
# vim: ts=2 sw=2 filetype=perl expandtab
# This file contains tests for the _public_ POE::Kernel interface
use strict;
use Test::More tests => 6;
use vars qw($poe_kernel);
BEGIN { use_ok("POE::Kernel"); }
# Start with errors.
eval { POE::Kernel->import( 'foo' ) };
ok(
$@ && $@ =~ /expects its arguments/,
"fails without a hash ref"
);
eval { POE::Kernel->import( { foo => "bar" } ) };
ok(
$@ && $@ =~ /import arguments/,
"fails with bogus hash ref"
);
eval { POE::Kernel->import( { loop => "Loop::Select" } ) };
ok(
!$@,
"specifying which loop to load works"
);
ok( defined($poe_kernel), "POE::Kernel exports $poe_kernel" );
ok( UNIVERSAL::isa($poe_kernel, "POE::Kernel"), " which contains a kernel" );
exit 0;
Jump to Line
Something went wrong with that request. Please try again.