Author: thatsafunnyname
Date: Sun Mar 8 14:21:17 2009
New Revision: 707
Modified:
trunk/t/92-file_port.t
Log:
Skipping tests this way because of the way Test::Portability::Files::import
sets a plan, and if multiple "plan skip_all =>" are used this causes a
failure
when Test::Portability::Files is available - "You tried to plan twice".
Test::Portability::Files::import is trying to be helpful by setting a plan,
but because it does it in import it doesn't play nicely with "plan
skip_all".
This time I tested using a perl instance without Test::Portability::Files
and
fixed the missing plan in this case. Sorry about that.
If this test continues to cause problems it can be removed.
Modified: trunk/t/92-file_port.t
==============================================================================
--- trunk/t/92-file_port.t (original)
+++ trunk/t/92-file_port.t Sun Mar 8 14:21:17 2009
@@ -3,19 +3,18 @@
use strict;
use warnings;
-use Test::More;
-
-plan skip_all => "This currently a developer-only test"
- unless -d '.svn';
+use Test::More qw(no_plan);
eval "use Test::Portability::Files";
-plan skip_all => "Test::Portability::Files required for testing filename
portability"
- if $@;
-plan skip_all => "Set NYTPROF_TEST_PORTABILITY_FILES env var to enable
test"
- unless $ENV{'NYTPROF_TEST_PORTABILITY_FILES'};
+# Skipping tests this way because of the way
Test::Portability::Files::import
+# sets a plan, and if multiple "plan skip_all =>" are used this causes a
failure
+# when Test::Portability::Files is available - "You tried to plan twice".
-options(all_tests => 1); # to be hyper-strict
-run_tests();
+SKIP: {
+ skip "Test::Portability::Files required for testing filenames
portability, this currently a developer-only test", 1 unless (!$@ &&
(-d '.svn') && ($ENV{'NYTPROF_TEST_PORTABILITY_FILES'}) );
+ options(all_tests => 1); # to be hyper-strict
+ run_tests();
+}
1;
--~--~---------~--~----~------------~-------~--~----~
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.
Group hosted at: http://groups.google.com/group/develnytprof-dev
Project hosted at: http://perl-devel-nytprof.googlecode.com
CPAN distribution: http://search.cpan.org/dist/Devel-NYTProf
To post, email: [email protected]
To unsubscribe, email: [email protected]
-~----------~----~----~----~------~----~------~--~---