diff options
author | Nicholas Clark <nick@ccl4.org> | 2001-10-07 21:53:33 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-10-08 11:53:30 +0000 |
commit | 88587957d5515b280bc1becf23e9f6520d5dce08 (patch) | |
tree | 9bce880697d5b08985c9b38192d4549c30054862 /lib/CGI | |
parent | e3b2f2afc4d28243cf088b06f65acc79e00144f5 (diff) | |
download | perl-88587957d5515b280bc1becf23e9f6520d5dce08.tar.gz |
& what's to be done for 5.8.0?
Message-ID: <20011007205333.S38756@plum.flirble.org>
p4raw-id: //depot/perl@12356
Diffstat (limited to 'lib/CGI')
-rw-r--r-- | lib/CGI/t/carp.t | 11 | ||||
-rw-r--r-- | lib/CGI/t/cookie.t | 5 |
2 files changed, 13 insertions, 3 deletions
diff --git a/lib/CGI/t/carp.t b/lib/CGI/t/carp.t index e6a91d1903..1eebef937a 100644 --- a/lib/CGI/t/carp.t +++ b/lib/CGI/t/carp.t @@ -1,8 +1,13 @@ # -*- Mode: cperl; coding: utf-8; cperl-indent-level: 2 -*- #!/usr/local/bin/perl -w +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} + use strict; -use lib qw(t/lib); +#use lib qw(t/lib); use Test::More tests => 42; use IO::Handle; @@ -91,7 +96,7 @@ is(@CGI::Carp::WARNINGS, 0, "_warn not called"); # Test that _warn is called at the correct time $CGI::Carp::WARN = 1; -$expect_l = __LINE__ + 1; +my $save_expect_l = $expect_l = __LINE__ + 1; like(CGI::Carp::warn("There is a problem"), "/] $id: There is a problem at $q_file line $expect_l.".'$/', "CGI::Carp::warn builds correct message"); @@ -166,7 +171,7 @@ untie *STDOUT; open(STDOUT, ">&REAL_STDOUT"); my $fname = $0; $fname =~ tr/<>-/\253\273\255/; # _warn does this so we have to also -is( $fake_out, "<!-- warning: There is a problem at $fname line 95. -->\n", +is( $fake_out, "<!-- warning: There is a problem at $fname line $save_expect_l. -->\n", 'warningsToBrowser() on' ); is($CGI::Carp::EMIT_WARNINGS, 1, "Warnings turned off"); diff --git a/lib/CGI/t/cookie.t b/lib/CGI/t/cookie.t index 25b6a3a210..a2012e556b 100644 --- a/lib/CGI/t/cookie.t +++ b/lib/CGI/t/cookie.t @@ -1,5 +1,10 @@ #!/usr/local/bin/perl -w +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} + use strict; use Test::More tests => 86; use CGI::Util qw(escape unescape); |