Change 30052 by [EMAIL PROTECTED] on 2007/01/28 22:30:18

        Convert ext/B/t/debug.t to Test::More. (Diagnostics are good, m'kay)

Affected files ...

... //depot/perl/ext/B/t/debug.t#5 edit

Differences ...

==== //depot/perl/ext/B/t/debug.t#5 (xtext) ====
Index: perl/ext/B/t/debug.t
--- perl/ext/B/t/debug.t#4~23691~       2004-12-29 03:57:57.000000000 -0800
+++ perl/ext/B/t/debug.t        2007-01-28 14:30:18.000000000 -0800
@@ -23,13 +23,7 @@
 use warnings;
 use strict;
 use Config;
-
-print "1..3\n";
-
-my $test = 1;
-
-sub ok { print "ok $test\n"; $test++ }
-
+use Test::More tests=>3;
 
 my $a;
 my $Is_VMS = $^O eq 'VMS';
@@ -39,15 +33,11 @@
 my $redir = $Is_MacOS ? "" : "2>&1";
 
 $a = `$^X $path "-MO=Debug" -e 1 $redir`;
-print "not " unless $a =~
-/\bLISTOP\b.*\bOP\b.*\bCOP\b.*\bOP\b/s;
-ok;
+like($a, qr/\bLISTOP\b.*\bOP\b.*\bCOP\b.*\bOP\b/s);
 
 
 $a = `$^X $path "-MO=Terse" -e 1 $redir`;
-print "not " unless $a =~
-/\bLISTOP\b.*leave.*\n    OP\b.*enter.*\n    COP\b.*nextstate.*\n    
OP\b.*null/s;
-ok;
+like($a, qr/\bLISTOP\b.*leave.*\n    OP\b.*enter.*\n    COP\b.*nextstate.*\n   
 OP\b.*null/s);
 
 $a = `$^X $path "-MO=Terse" -ane "s/foo/bar/" $redir`;
 $a =~ s/\(0x[^)]+\)//g;
@@ -74,6 +64,5 @@
 }
 $b=~s/\n/ /g;$b=~s/\s+/ /g;
 $b =~ s/\s+$//;
-print "# [$a]\n# vs\n# [$b]\nnot " if $a ne $b;
-ok;
+is($a, $b);
 
End of Patch.

Reply via email to