Change 14179 by jhi@alpha on 2002/01/11 13:24:13
Subject: [PATCH] is() undef/'' behavior change
From: Michael G Schwern <[EMAIL PROTECTED]>
Date: Fri, 11 Jan 2002 03:35:51 -0500
Message-ID: <20020111083551.GC30666@blackrider>
Subject: [PATCH] Pod::InputObjects warnings & is() undef/'' fix
From: Michael G Schwern <[EMAIL PROTECTED]>
Date: Fri, 11 Jan 2002 03:37:44 -0500
Message-ID: <20020111083744.GD30666@blackrider>
Affected files ...
.... //depot/perl/ext/re/re.t#3 edit
.... //depot/perl/lib/AutoSplit.t#11 edit
.... //depot/perl/lib/DB.t#5 edit
.... //depot/perl/lib/ExtUtils/t/Command.t#2 edit
.... //depot/perl/lib/ExtUtils/t/Manifest.t#2 edit
.... //depot/perl/lib/Pod/InputObjects.pm#16 edit
.... //depot/perl/lib/Pod/t/InputObjects.t#2 edit
.... //depot/perl/lib/blib.t#2 edit
Differences ...
==== //depot/perl/ext/re/re.t#3 (text) ====
Index: perl/ext/re/re.t
--- perl/ext/re/re.t.~1~ Fri Jan 11 06:30:06 2002
+++ perl/ext/re/re.t Fri Jan 11 06:30:06 2002
@@ -1,12 +1,12 @@
#!./perl
-use strict;
-
BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
}
+use strict;
+
use Test::More tests => 13;
require_ok( 're' );
@@ -31,7 +31,7 @@
delete $ENV{PERL_RE_COLORS};
re::bits(0, 'debug');
-is( $ENV{PERL_RE_COLORS}, '',
+is( $ENV{PERL_RE_COLORS}, undef,
"... should not set regex colors given 'debug'" );
re::bits(0, 'debugcolor');
isnt( $ENV{PERL_RE_COLORS}, '',
==== //depot/perl/lib/AutoSplit.t#11 (text) ====
Index: perl/lib/AutoSplit.t
--- perl/lib/AutoSplit.t.~1~ Fri Jan 11 06:30:06 2002
+++ perl/lib/AutoSplit.t Fri Jan 11 06:30:06 2002
@@ -115,7 +115,7 @@
}
# test n+1
- is ($output, $args{Get}, "Output from autosplit()ing $args{Name}");
+ cmp_ok ($output, 'eq', $args{Get}, "Output from autosplit()ing $args{Name}");
if ($args{Files}) {
$args{Files} =~ s!/!:!gs if $^O eq 'MacOS';
==== //depot/perl/lib/DB.t#5 (text) ====
Index: perl/lib/DB.t
--- perl/lib/DB.t.~1~ Fri Jan 11 06:30:06 2002
+++ perl/lib/DB.t Fri Jan 11 06:30:06 2002
@@ -1,4 +1,4 @@
-#!./perl -w
+#!./perl -Tw
BEGIN {
chdir 't' if -d 't';
@@ -79,8 +79,10 @@
}
# test DB::_clientname()
-is( DB::_clientname('foo=A(1)'), 'foo','DB::_clientname should return refname');
-is( DB::_clientname('bar'), '','DB::_clientname should not return non refname');
+is( DB::_clientname('foo=A(1)'), 'foo',
+ 'DB::_clientname should return refname');
+cmp_ok( DB::_clientname('bar'), 'eq', '',
+ 'DB::_clientname should not return non refname');
# test DB::next() and DB::step()
{
==== //depot/perl/lib/ExtUtils/t/Command.t#2 (text) ====
Index: perl/lib/ExtUtils/t/Command.t
--- perl/lib/ExtUtils/t/Command.t.~1~ Fri Jan 11 06:30:06 2002
+++ perl/lib/ExtUtils/t/Command.t Fri Jan 11 06:30:06 2002
@@ -1,4 +1,4 @@
-#!./perl -w
+#!./perl -Tw
BEGIN {
chdir 't' if -d 't';
@@ -71,7 +71,7 @@
ok( test_f(), 'testing non-existent file' );
@ARGV = ( 'ecmdfile' );
- is( ! test_f(), (-f 'ecmdfile'), 'testing non-existent file' );
+ cmp_ok( ! test_f(), '==', (-f 'ecmdfile'), 'testing non-existent file' );
# these are destructive, have to keep setting @ARGV
@ARGV = ( 'ecmdfile' );
==== //depot/perl/lib/ExtUtils/t/Manifest.t#2 (text) ====
Index: perl/lib/ExtUtils/t/Manifest.t
--- perl/lib/ExtUtils/t/Manifest.t.~1~ Fri Jan 11 06:30:06 2002
+++ perl/lib/ExtUtils/t/Manifest.t Fri Jan 11 06:30:06 2002
@@ -81,7 +81,7 @@
use vars qw($ExtUtils::Manifest::Quiet);
$ExtUtils::Manifest::Quiet = 1;
($res, $warn) = catch_warning( \&ExtUtils::Manifest::skipcheck );
-is( $warn, '', 'disabled warnings' );
+cmp_ok( $warn, ,'eq', '', 'disabled warnings' );
# add a skip file with a rule to skip itself
add_file( 'MANIFEST.SKIP', "baz\n.SKIP" );
==== //depot/perl/lib/Pod/InputObjects.pm#16 (text) ====
==== //depot/perl/lib/Pod/t/InputObjects.t#2 (text) ====
==== //depot/perl/lib/blib.t#2 (text) ====
Index: perl/lib/blib.t
--- perl/lib/blib.t.~1~ Fri Jan 11 06:30:06 2002
+++ perl/lib/blib.t Fri Jan 11 06:30:06 2002
@@ -30,7 +30,7 @@
_mkdirs(qw(blib blib/arch blib/lib));
{
- my $warnings;
+ my $warnings = '';
local $SIG{__WARN__} = sub { $warnings = join '', @_ };
use_ok('blib');
is( $warnings, '', 'use blib is niiiice and quiet' );
End of Patch.