From d96222f273529fc287bfeb19af28d5217f3f74aa Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Fri, 9 Oct 2009 14:17:29 +0200 Subject: Don't use require in comp/our.t, as require isn't tested yet. Emit TAP directly. --- t/comp/our.t | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 't') 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; -- cgit v1.2.1