File: debugger.t

package info (click to toggle)
libmethod-signatures-perl 20170211-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 672 kB
  • sloc: perl: 3,860; makefile: 2
file content (40 lines) | stat: -r--r--r-- 891 bytes parent folder | download | duplicates (7)
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
38
39
40
#!/usr/bin/perl -w

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 Method::Signatures;  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" -MMethod::Signatures -le "package Foo;  use Method::Signatures;  method foo() { 42 } print Foo->foo()"};
    alarm 0;
    $ret;
}, "42\n", 'one liner with -MMethod::Signatures';
is $@, '';


is eval {
    local $SIG{ALRM} = sub { die "Alarm!\n"; };

    local $ENV{PERLDB_OPTS} = 'NonStop';
    alarm 5;
    my $ret = qx{$^X "-Ilib" -dw t/simple.plx};
    alarm 0;
    $ret;
}, "42", 'debugger';
is $@, '';