fail-more.t revision 7c478bd95313f5f23a4c958a745db2134aa03244
#!perl -w
BEGIN {
chdir 't';
}
else {
}
}
use strict;
# Can't use Test.pm, that's a 5.005 thing.
print "1..2\n";
my $test_num = 1;
# Utility testing functions.
print $ok;
$test_num++;
return $test;
}
my $Total = 28;
# Preserve the line numbers.
#line 38
#line 40
# Nick Clark found this was a bug. Fixed in 0.40.
#line 52
isa_ok(bless([], "Foo"), "Wibble");
isa_ok(42, "Wibble", "My Wibble");
isa_ok(undef, "Wibble", "Another Wibble");
isa_ok([], "HASH");
#line 68
cmp_ok( 42.1, '==', 23, , ' ==' );
cmp_ok( 42, '!=', 42 , ' !=' );
cmp_ok( 1, '&&', 0 , ' &&' );
# generate a $!, it changes its value by context.
-e "wibblehibble";
my $Errno_Number = $!+0;
my $Errno_String = $!.'';
#line 84
#line 88
END {
1..$Total
not ok 1 - failing
not ok 2 - foo is bar?
not ok 3 - undef is empty string?
not ok 4 - undef is 0?
not ok 5 - empty string is 0?
not ok 6 - foo isnt foo?
not ok 7 - foo isn't foo?
my $err_re = <<ERR;
# Failed test ($0 at line 38)
# Failed test ($0 at line 40)
# got: 'foo'
# expected: 'bar'
# Failed test ($0 at line 41)
# got: undef
# expected: ''
# Failed test ($0 at line 42)
# got: undef
# expected: '0'
# Failed test ($0 at line 43)
# got: ''
# expected: '0'
# Failed test ($0 at line 45)
# 'foo'
# ne
# 'foo'
# Failed test ($0 at line 46)
# 'foo'
# ne
# 'foo'
# Failed test ($0 at line 48)
# 'foo'
# doesn't match '/that/'
# Failed test ($0 at line 49)
# 'foo'
# matches '/foo/'
# Failed test ($0 at line 52)
# 'bug'
# doesn't match '/(%)/'
# Failed test ($0 at line 54)
# Failed test ($0 at line 52)
# Mooble::Hooble::Yooble->can('this') failed
# Mooble::Hooble::Yooble->can('that') failed
# Failed test ($0 at line 53)
# can_ok() called with no methods
# Failed test ($0 at line 55)
# The object isn't a 'Wibble' it's a 'Foo'
# Failed test ($0 at line 56)
# My Wibble isn't a reference
# Failed test ($0 at line 57)
# Another Wibble isn't defined
# Failed test ($0 at line 58)
# The object isn't a 'HASH' it's a 'ARRAY'
# Failed test ($0 at line 68)
# got: 'foo'
# expected: 'bar'
# Failed test ($0 at line 69)
# got: 42.1
# expected: 23
# Failed test ($0 at line 70)
# '42'
# !=
# '42'
# Failed test ($0 at line 71)
# '1'
# &&
# '0'
# Failed test ($0 at line 72)
# got: 42
# expected: 0
# Failed test ($0 at line 73)
# got: '42'
# expected: 'foo'
# Failed test ($0 at line 74)
# got: undef
# expected: 'foo'
# Failed test ($0 at line 80)
# got: '$Errno_String'
# expected: ''
# Failed test ($0 at line 81)
# got: $Errno_Number
# expected: -1
ERR
my $more_err_re = <<ERR;
# Failed test \\($filename at line 84\\)
# Tried to use 'Hooble::mooble::yooble'.
# Error: Can't locate Hooble.* in \\\@INC .*
# Failed test \\($filename at line 85\\)
# Tried to require 'ALL::YOUR::BASE::ARE::BELONG::TO::US::wibble'.
# Error: Can't locate ALL.* in \\\@INC .*
# Looks like you failed $Total tests of $Total.
ERR
'failing errors') ) {
print $$err;
}
exit(0);
}