summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-10-09 12:49:05 +0200
committerNicholas Clark <nick@ccl4.org>2009-10-09 20:26:17 +0200
commit61ad1ccdd1fb87e147781b339b1726060969106c (patch)
tree23becb7efda59616baac5ed8dce40cddd217750f
parentad41de7f1edc024bbebd9862b2b56b6486f7189c (diff)
downloadperl-61ad1ccdd1fb87e147781b339b1726060969106c.tar.gz
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.
-rw-r--r--t/comp/utf.t16
1 files changed, 11 insertions, 5 deletions
diff --git a/t/comp/utf.t b/t/comp/utf.t
index 0d340f6f98..6f79d27769 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) {