diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-01-28 22:30:18 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-01-28 22:30:18 +0000 |
commit | f071ed12d768b92e96fb1ecf3f2ac6262bc75f07 (patch) | |
tree | 524e66cb997016e8eed6eafdee6890af0dc7d5c4 /ext | |
parent | 456084a83a83d668c3227c68dea62e5133c8a74e (diff) | |
download | perl-f071ed12d768b92e96fb1ecf3f2ac6262bc75f07.tar.gz |
Convert ext/B/t/debug.t to Test::More. (Diagnostics are good, m'kay)
p4raw-id: //depot/perl@30052
Diffstat (limited to 'ext')
-rwxr-xr-x | ext/B/t/debug.t | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/ext/B/t/debug.t b/ext/B/t/debug.t index 0e502ee200..225385eada 100755 --- a/ext/B/t/debug.t +++ b/ext/B/t/debug.t @@ -23,13 +23,7 @@ $| = 1; 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 $path = join " ", map { qq["-I$_"] } @INC; 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 @@ EOF } $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); |