xref: /openbsd-src/gnu/usr.bin/perl/cpan/autodie/t/exec.t (revision b39c515898423c8d899e35282f4b395f7cad3298)
1*b39c5158Smillert#!/usr/bin/perl -w
2*b39c5158Smillertuse strict;
3*b39c5158Smillertuse Test::More tests => 3;
4*b39c5158Smillert
5*b39c5158Smillerteval {
6*b39c5158Smillert    use autodie qw(exec);
7*b39c5158Smillert    exec("this_command_had_better_not_exist", 1);
8*b39c5158Smillert};
9*b39c5158Smillert
10*b39c5158Smillertisa_ok($@,"autodie::exception", "failed execs should die");
11*b39c5158Smillertok($@->matches('exec'), "exception should match exec");
12*b39c5158Smillertok($@->matches(':system'), "exception should match :system");
13