xref: /onnv-gate/usr/src/cmd/perl/5.8.4/distrib/lib/diagnostics.t (revision 0:68f95e015346)
1*0Sstevel@tonic-gate#!./perl
2*0Sstevel@tonic-gate
3*0Sstevel@tonic-gateBEGIN {
4*0Sstevel@tonic-gate    if ($^O eq 'MacOS') {
5*0Sstevel@tonic-gate	chdir '::' if -d '::pod' && -d '::t';
6*0Sstevel@tonic-gate	@INC = ':lib:';
7*0Sstevel@tonic-gate    } else {
8*0Sstevel@tonic-gate	chdir '..' if -d '../pod' && -d '../t';
9*0Sstevel@tonic-gate	@INC = 'lib';
10*0Sstevel@tonic-gate    }
11*0Sstevel@tonic-gate}
12*0Sstevel@tonic-gate
13*0Sstevel@tonic-gateuse Test::More tests => 2;
14*0Sstevel@tonic-gate
15*0Sstevel@tonic-gateBEGIN { use_ok('diagnostics') }
16*0Sstevel@tonic-gate
17*0Sstevel@tonic-gaterequire base;
18*0Sstevel@tonic-gate
19*0Sstevel@tonic-gateeval {
20*0Sstevel@tonic-gate    'base'->import(qw(I::do::not::exist));
21*0Sstevel@tonic-gate};
22*0Sstevel@tonic-gate
23*0Sstevel@tonic-gatelike( $@, qr/^Base class package "I::do::not::exist" is empty/);
24