Upgrade to Test-Simple-0.82.
[p5sagit/p5-mst-13.2.git] / lib / Test / Simple / t / BEGIN_use_ok.t
CommitLineData
00881caa 1#!/usr/bin/perl -w
ccbd73a4 2# $Id: /mirror/googlecode/test-more/t/BEGIN_use_ok.t 57943 2008-08-18T02:09:22.275428Z brooklyn.kid51 $
00881caa 3
4# [rt.cpan.org 28345]
5#
6# A use_ok() inside a BEGIN block lacking a plan would be silently ignored.
7
8BEGIN {
9 if( $ENV{PERL_CORE} ) {
10 chdir 't';
11 @INC = ('../lib', 'lib');
12 }
13 else {
14 unshift @INC, 't/lib';
15 }
16}
17
18use Test::More;
19
20my $result;
21BEGIN {
22 eval {
23 use_ok("Wibble");
24 };
25 $result = $@;
26}
27
28plan tests => 1;
29like $result, '/^You tried to run a test without a plan/';