File: 06rewrite_config.t

package info (click to toggle)
libinline-perl 0.86-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 504 kB
  • sloc: perl: 3,147; sh: 57; makefile: 2
file content (31 lines) | stat: -rw-r--r-- 659 bytes parent folder | download | duplicates (5)
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
BEGIN {
  if($] < 5.007) {
    print "1..1\n";
    warn "Skipped for perl 5.6.x\n";
    print "ok 1\n";
    exit(0);
  }
};

use warnings; use strict;
use lib -e 't' ? 't' : 'test';
use Test::More tests => 2;

use Test::Warn;

use TestInlineSetup;
use Inline Config => DIRECTORY => $TestInlineSetup::DIR;
eval q{use Inline 'Bogus' => 'code';};

# Suppress "Set up gcc environment ..." warning.
# (Affects ActivePerl only.)
$ENV{ACTIVEPERL_CONFIG_SILENT} = 1;

my $w = 'config file removal successful';

warnings_like {require_rewrite()} [qr/$w/], 'warn_test';

sub require_rewrite {
    my $t = -d 't' ? 't' : 'test';
    require "./$t/06rewrite_config.p";
}