File: 10_naive_loop_load_poll.t

package info (click to toggle)
libpoe-perl 2%3A1.3670-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,000 kB
  • ctags: 1,416
  • sloc: perl: 22,865; makefile: 9
file content (37 lines) | stat: -rw-r--r-- 769 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/perl -w
# vim: ts=2 sw=2 filetype=perl expandtab

use strict;

use Test::More tests => 2;
sub POE::Kernel::ASSERT_DEFAULT () { 1 }

BEGIN {
  package POE::Kernel;
  use constant TRACE_DEFAULT => exists($INC{'Devel/Cover.pm'});
}

TODO: {
  local $TODO = 'This feature is not implemented yet';

  # Hide warnings.
  {
	  local $SIG{__WARN__} = sub { undef };
    eval "use POE::Loop::IO_Poll; use POE";
  }

  ok(! $@, "Loading a loop the naive way doesn't explode");

  # Hide warnings.
  my $loop_loaded;
  {
	  local $SIG{__WARN__} = sub { undef };
    eval '$loop_loaded = $poe_kernel->poe_kernel_loop()';
  }

  if ( ! $@ ) {
    is( $loop_loaded, 'POE::Loop::IO_Poll', "POE loaded the right loop" );
  } else {
    ok( 0, "Dummy test for TODO" );
  }
}