From: Nicholas Clark Date: Fri, 9 Oct 2009 10:49:05 +0000 (+0200) Subject: Don't use require in comp/utf.t, as require isn't tested yet. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=61ad1ccdd1fb87e147781b339b1726060969106c;p=p5sagit%2Fp5-mst-13.2.git Don't use require in comp/utf.t, as require isn't tested yet. So emit TAP directly, rather than utilising test.pl. Like test.pl, avoid using ++, as it has complexity, and that complexity isn't tested yet. --- diff --git a/t/comp/utf.t b/t/comp/utf.t index 0d340f6..6f79d27 100644 --- a/t/comp/utf.t +++ b/t/comp/utf.t @@ -1,8 +1,7 @@ -#!./perl +#!./perl -w -BEGIN { require "./test.pl"; } - -plan(tests => 18); +print "1..18\n"; +my $test = 0; my %templates = ( utf8 => 'C0U', @@ -24,7 +23,14 @@ sub test { print $fh bytes_to_utf($enc, "$tag\n", $bom); close $fh or die $!; my $got = do "./utf$$.pl"; - is($got, $tag); + $test = $test + 1; + if (!defined $got) { + print "not ok $test # $enc $tag $bom; got undef\n"; + } elsif ($got ne $tag) { + print "not ok $test # $enc $tag $bom; got '$got'\n"; + } else { + print "ok $test\n"; + } } for my $bom (0, 1) {