DProf fixes
[p5sagit/p5-mst-13.2.git] / ext / Devel / DProf / DProf.t
index 5ecba68..3488bc8 100644 (file)
@@ -3,6 +3,7 @@
 BEGIN {
     chdir( 't' ) if -d 't';
     @INC = '../lib';
+    require './test.pl';      # for which_perl() etc
     require Config; import Config;
     if ($Config{'extensions'} !~ /\bDevel\/DProf\b/){
       print "1..0 # Skip: Devel::DProf was not built\n";
@@ -27,7 +28,7 @@ getopts('vI:p:');
 
 $path_sep = $Config{path_sep} || ':';
 $perl5lib = $opt_I || join( $path_sep, @INC );
-$perl = $opt_p || $^X;
+$perl = $opt_p || which_perl();
 
 if( $opt_v ){
        print "tests: @tests\n";
@@ -57,7 +58,7 @@ sub profile {
                print @results
        }
 
-        print '# ',timestr( $t_total, 'nop' ), "\n";
+        print '# ' . timestr( $t_total, 'nop' ), "\n";
 }
 
 
@@ -72,7 +73,7 @@ sub verify {
 
 
 $| = 1;
-print "1..18\n";
+print "1..20\n";
 while( @tests ){
        $test = shift @tests;
         $test =~ s/\.$// if $^O eq 'VMS';