[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl5-changes
Subject:    Change 31649: Need to run the plan() at BEGIN time, else the use_ok() will fail.
From:       Nicholas Clark <nwc10+p5p4 () colon ! colondot ! net>
Date:       2007-07-23 20:15:02
Message-ID: 20070723201502.29B93215B9E () mx ! activestate ! com
[Download RAW message or body]

Change 31649 by nicholas@nicholas-saigo on 2007/07/23 20:07:29

	Need to run the plan() at BEGIN time, else the use_ok() will fail.
	However, it doesn't actually produce any output due to a known core
	bug: http://rt.cpan.org/Ticket/Display.html?id=28345
	(But the test count in the plan saves our bacon by alerting us)

Affected files ...

... //depot/perl/ext/Encode/t/mime_header_iso2022jp.t#4 edit

Differences ...

==== //depot/perl/ext/Encode/t/mime_header_iso2022jp.t#4 (text) ====
Index: perl/ext/Encode/t/mime_header_iso2022jp.t
--- perl/ext/Encode/t/mime_header_iso2022jp.t#3~31648~	2007-07-23 06:42:24.000000000 -0700
+++ perl/ext/Encode/t/mime_header_iso2022jp.t	2007-07-23 13:07:29.000000000 -0700
@@ -1,10 +1,12 @@
 
 use Test::More;
 
-if( ord("A") == 193 ) {
-    plan skip_all => 'No Encode::MIME::Header::ISO_2022_JP on EBCDIC Platforms';
-} else {
-    plan tests => 14;
+BEGIN {
+    if( ord("A") == 193 ) {
+	plan skip_all => 'No Encode::MIME::Header::ISO_2022_JP on EBCDIC Platforms';
+    } else {
+	plan tests => 14;
+    }
 }
 
 use strict;
End of Patch.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic