File: 004env.t

package info (click to toggle)
libdevel-hide-perl 0.0015-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 152 kB
  • sloc: perl: 211; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 431 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

use strict;
use Test::More tests => 5;

use_ok('lib', 't');

# this script tests Devel::Hide respects environment variable DEVEL_HIDE_PM 

$ENV{DEVEL_HIDE_PM} = 'Q.pm R';
use_ok('Devel::Hide');

eval { require P }; 
ok(!$@, "P was loaded (as it should)");

eval { require Q }; 
like($@, qr/^Can't locate Q\.pm/, "Q not found (as it should)");

eval { require R }; 
like($@, qr/^Can't locate R\.pm/, "R not found (as it should)");