X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fforeign%2FMethod-Signatures%2Fdebugger.t;fp=t%2Fforeign%2FMethod-Signatures%2Fdebugger.t;h=093623d42fc45d2b99a2856eef8fdeec336e5621;hb=1a52f2db46f6d870454428a07bfae09e0359eeee;hp=0000000000000000000000000000000000000000;hpb=ff265988561375d3cf480004e29e3891094c0afb;p=p5sagit%2FFunction-Parameters.git diff --git a/t/foreign/Method-Signatures/debugger.t b/t/foreign/Method-Signatures/debugger.t new file mode 100644 index 0000000..093623d --- /dev/null +++ b/t/foreign/Method-Signatures/debugger.t @@ -0,0 +1,44 @@ +#!perl +use strict; +use warnings FATAL => 'all'; + +use Dir::Self; +use Test::More 'no_plan'; + +#TODO: { +# todo_skip "This is still totally hosed", 2; + + is eval { + local $SIG{ALRM} = sub { die "Alarm!\n"; }; + + alarm 5; + my $ret = qx{$^X "-Ilib" -le "package Foo; use Function::Parameters; method foo() { 42 } print Foo->foo()"}; + alarm 0; + $ret; + }, "42\n", 'one-liner'; + is $@, ''; +#} + + +is eval { + local $SIG{ALRM} = sub { die "Alarm!\n"; }; + + alarm 5; + my $ret = qx{$^X "-Ilib" -MFunction::Parameters -le "package Foo; use Function::Parameters; method foo() { 42 } print Foo->foo()"}; + alarm 0; + $ret; +}, "42\n", 'one liner with -MFunction::Parameters'; +is $@, ''; + + +is eval { + local $SIG{ALRM} = sub { die "Alarm!\n"; }; + my $simple_plx = __DIR__ . '/simple.plx'; + + local $ENV{PERLDB_OPTS} = 'NonStop'; + alarm 5; + my $ret = qx{$^X "-Ilib" -dw $simple_plx}; + alarm 0; + $ret; +}, "42", 'debugger'; +is $@, '';