Permalink
Browse files

Add TODO test for double POE::Loop loading

  • Loading branch information...
1 parent ddab689 commit ee6f8bd9ae7000b3ac498070a94df405726bdb67 Larwan Berke committed Jun 21, 2010
Showing with 25 additions and 0 deletions.
  1. +1 −0 MANIFEST
  2. +24 −0 t/10_units/08_loops/11_double_loop.t
View
@@ -129,6 +129,7 @@ t/10_units/08_loops/07_kernel_loop_fail.t
t/10_units/08_loops/08_kernel_loop_search_poll.t
t/10_units/08_loops/09_naive_loop_load.t
t/10_units/08_loops/10_naive_loop_load_poll.t
+t/10_units/08_loops/11_double_loop.t
t/20_resources/00_base/aliases.pm
t/20_resources/00_base/caller_state.pm
t/20_resources/00_base/events.pm
@@ -0,0 +1,24 @@
+#!/usr/bin/perl -w
+# vim: ts=2 sw=2 filetype=perl expandtab
+
+use strict;
+
+use Test::More tests => 1;
+sub POE::Kernel::ASSERT_DEFAULT () { 1 }
+
+BEGIN {
+ package POE::Kernel;
+ use constant TRACE_DEFAULT => exists($INC{'Devel/Cover.pm'});
+}
+
+TODO: {
+ local $TODO = 'This needs to be investigated someday...';
+
+ # Hide warnings.
+ {
+ local $SIG{__WARN__} = sub { undef };
+ # This relies on the assumption that loading POE defaults to PoLo::Select!
+ eval "use POE; use POE::Kernel { loop => 'IO_Poll' };";
+ }
+ ok($@, "loading a loop throws an error if a loop was already loaded");
+}

0 comments on commit ee6f8bd

Please sign in to comment.