Change 34158 by [EMAIL PROTECTED] on 2008/07/26 19:51:03

        Convert yadayada.t to test.pl and strict, and fix two diagnostic errors
        found in the process.

Affected files ...

... //depot/perl/t/op/yadayada.t#2 edit

Differences ...

==== //depot/perl/t/op/yadayada.t#2 (text) ====
Index: perl/t/op/yadayada.t
--- perl/t/op/yadayada.t#1~33858~       2008-05-18 14:08:01.000000000 -0700
+++ perl/t/op/yadayada.t        2008-07-26 12:51:03.000000000 -0700
@@ -1,30 +1,34 @@
 #!./perl
 
-print "1..5\n";
+BEGIN {
+    chdir 't' if -d 't';
+    @INC = '../lib';
+    require './test.pl';
+}
 
-$err = "Unimplemented at $0 line " . ( __LINE__ + 2 ) . ".\n";
+use strict;
+
+plan 5;
+
+my $err = "Unimplemented at $0 line " . ( __LINE__ + 2 ) . ".\n";
 
 eval { ... };
 
-print "not " unless $@ eq $err;
-print "ok 1\n";
-print "# expected: '$err'\n# received: '$@'\n" unless $@ eq $err;
+is $@, $err;
 
 $err = "foo at $0 line " . ( __LINE__ + 2 ) . ".\n";
 
 eval { !!! "foo" };
 
-print "not " unless $@ eq $err;
-print "ok 2\n";
-print "# expected: '$err'\n# received: '$@'\n" unless $@ eq $err;
+is $@, $err;
 
 $err = "Died at $0 line " . ( __LINE__ + 2 ) . ".\n";
 
 eval { !!! };
 
-print "not " unless $@ eq $err;
-print "ok 3\n";
-print "# expected: '$err'\n# received: '$@'\n" unless $@ eq $err;
+is $@, $err;
+
+my $warning;
 
 local $SIG{__WARN__} = sub { $warning = shift };
 
@@ -32,14 +36,10 @@
 
 eval { ??? "bar" };
 
-print "not " unless $warning eq $err;
-print "ok 4\n";
-print "# expected: '$warning'\n# received: '$warningn" unless $warning eq $err;
+is $warning, $err;
 
 $err = "Warning: something's wrong at $0 line " . ( __LINE__ + 2 ) . ".\n";
 
 eval { ??? };
 
-print "not " unless $warning eq $err;
-print "ok 5\n";
-print "# expected: '$warning'\n# received: '$warningn" unless $warning eq $err;
+is $warning, $err;
End of Patch.

Reply via email to