diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-10-09 14:17:29 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-10-09 20:26:18 +0200 |
commit | d96222f273529fc287bfeb19af28d5217f3f74aa (patch) | |
tree | 0f8e7917b2284fa86f0a358d7241c0da9ac29c6c /t | |
parent | c9786f600ff793ec8526cb8722afafeff5cf741e (diff) | |
download | perl-d96222f273529fc287bfeb19af28d5217f3f74aa.tar.gz |
Don't use require in comp/our.t, as require isn't tested yet.
Emit TAP directly.
Diffstat (limited to 't')
-rw-r--r-- | t/comp/our.t | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/t/comp/our.t b/t/comp/our.t index 69fbb03121..d271fe517c 100644 --- a/t/comp/our.t +++ b/t/comp/our.t @@ -1,12 +1,27 @@ #!./perl -BEGIN { - chdir 't'; - @INC = '../lib'; - require './test.pl'; -} - print "1..7\n"; +my $test = 0; + +sub is { + my ($got, $expect, $name) = @_; + $test = $test + 1; + if (defined $got && $got eq $expect) { + print "ok $test - $name\n"; + return 1; + } + + print "not ok $test - $name\n"; + my @caller = caller(0); + print "# Failed test at $caller[1] line $caller[2]\n"; + if (defined $got) { + print "# Got '$got'\n"; + } else { + print "# Got undef\n"; + } + print "# Expected $expect\n"; + return; +} { package TieAll; |