Fix remaining skips for Test::Harness
[p5sagit/p5-mst-13.2.git] / lib / Test / Harness / t / proverc.t
index 0e196ec..2577250 100644 (file)
@@ -1,10 +1,12 @@
 #!/usr/bin/perl -w
 
 BEGIN {
-    if ($ENV{PERL_CORE}) {
-       # FIXME
-       print "1..0 # Skip, needs fixing. Probably an -I issue\n";
-       exit 0;
+    if ( $ENV{PERL_CORE} ) {
+        chdir 't';
+        @INC = ( '../lib', 'lib' );
+    }
+    else {
+        unshift @INC, 't/lib';
     }
 }
 
@@ -16,10 +18,15 @@ use App::Prove;
 
 my $prove = App::Prove->new;
 
-$prove->add_rc_file( File::Spec->catfile( 't', 'data', 'proverc' ) );
+$prove->add_rc_file(
+    File::Spec->catfile(
+        ( $ENV{PERL_CORE} ? 'lib' : 't' ), 'data', 'proverc'
+    )
+);
 
 is_deeply $prove->{rc_opts},
   [ '--should', 'be', '--split', 'correctly', 'Can', 'quote things',
-    'using single or', 'double quotes', '--this', 'is', 'OK?' ],
+    'using single or', 'double quotes', '--this', 'is', 'OK?'
+  ],
   'options parsed';