File: tbt_09do.t

package info (click to toggle)
libtest-simple-perl 1.302211-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,972 kB
  • sloc: perl: 19,894; makefile: 7
file content (23 lines) | stat: -rw-r--r-- 603 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/perl

use strict;
use warnings;

use Test::Builder::Tester tests => 3;
use Test::More;
use File::Basename qw(dirname);
use File::Spec qw();

my $file = File::Spec->join(dirname(__FILE__), 'tbt_09do_script.pl');
$file = File::Spec->rel2abs(File::Spec->catfile(File::Spec->curdir(), $file))
    unless File::Spec->file_name_is_absolute($file);
my $done = do $file;
ok(defined($done), 'do succeeded') or do {
    if ($@) {
        diag qq(  \$@ is '$@'\n);
    } elsif ($!) {
        diag qq(  \$! is '$!'\n);
    } else {
        diag qq(  file's last statement returned undef: $file)
    }
};