update foreign tests
[p5sagit/Function-Parameters.git] / t / foreign / Method-Signatures / debugger.t
1 #!perl
2 use strict;
3 use warnings FATAL => 'all';
4
5 use Dir::Self;
6 use Test::More 'no_plan';
7
8 #TODO: {
9 #    todo_skip "This is still totally hosed", 2;
10
11     is eval {
12         local $SIG{ALRM} = sub { die "Alarm!\n"; };
13
14         alarm 5;
15         my $ret = qx{$^X "-Ilib" -le "package Foo;  use Function::Parameters;  method foo() { 42 } print Foo->foo()"};
16         alarm 0;
17         $ret;
18     }, "42\n", 'one-liner';
19     is $@, '';
20 #}
21
22
23 is eval {
24     local $SIG{ALRM} = sub { die "Alarm!\n"; };
25
26     alarm 5;
27     my $ret = qx{$^X "-Ilib" -MFunction::Parameters -le "package Foo;  use Function::Parameters;  method foo() { 42 } print Foo->foo()"};
28     alarm 0;
29     $ret;
30 }, "42\n", 'one liner with -MFunction::Parameters';
31 is $@, '';
32
33
34 is eval {
35     local $SIG{ALRM} = sub { die "Alarm!\n"; };
36     my $simple_plx = __DIR__ . '/simple.plx';
37
38     local $ENV{PERLDB_OPTS} = 'NonStop';
39     alarm 5;
40     my $ret = qx{$^X "-Ilib" -dw $simple_plx};
41     alarm 0;
42     $ret;
43 }, "42", 'debugger';
44 is $@, '';