blob: 1d4e50d6f0ee9b7aae066c1190bc2fec9578be18 (
plain)
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
32
33
34
35
36
37
38
39
|
#!/usr/bin/perl -w
# $Id$
BEGIN {
if( $ENV{PERL_CORE} ) {
chdir 't';
@INC = '../lib';
}
}
my $test_num = 1;
# Utility testing functions.
sub ok ($;$) {
my($test, $name) = @_;
my $ok = '';
$ok .= "not " unless $test;
$ok .= "ok $test_num";
$ok .= " - $name" if defined $name;
$ok .= "\n";
print $ok;
$test_num++;
return $test;
}
use Test::Builder;
my $Test = Test::Builder->new;
print "1..2\n";
eval { $Test->plan(7); };
ok( $@ =~ /^plan\(\) doesn't understand 7/, 'bad plan()' ) ||
print STDERR "# $@";
eval { $Test->plan(wibble => 7); };
ok( $@ =~ /^plan\(\) doesn't understand wibble 7/, 'bad plan()' ) ||
print STDERR "# $@";
|