# New Ticket Created by  Steve Fink 
# Please include the string:  [perl #16852]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=16852 >


This patch trims off the period at the end of executable filenames for
C-based tests on unix. (It compiled "t/src/basic_1.c" ->
"t/src/basic_1."; this patch makes that "t/src/basic_1")



-- attachment  1 ------------------------------------------------------
url: http://rt.perl.org/rt2/attach/36036/29153/edd568/extensions.patch

Index: lib/Parrot/Test.pm
===================================================================
RCS file: /cvs/public/parrot/lib/Parrot/Test.pm,v
retrieving revision 1.25
diff -p -u -r1.25 Test.pm
--- lib/Parrot/Test.pm  28 Aug 2002 05:10:54 -0000      1.25
+++ lib/Parrot/Test.pm  29 Aug 2002 18:00:38 -0000
@@ -48,17 +48,16 @@ sub _run_command {
 
 sub per_test {
   my ($ext,$count) = @_;
-  $ext =~ s/^\.//;
   my $t = $0;
-  $t =~ s/\.t$/_$count\.$ext/;
+  $t =~ s/\.t$/_$count$ext/;
   return $t;
 }
 
 sub generate_pbc_for {
   my ($assembly,$directory,$count) = @_;
   local( *ASSEMBLY, *OUTPUT );
-  my $as_f = per_test('pasm',$count);
-  my $by_f = per_test('pbc',$count);
+  my $as_f = per_test('.pasm',$count);
+  my $by_f = per_test('.pbc',$count);
 
   my $can_skip_compile = $ENV{PARROT_QUICKTEST};
   if ($can_skip_compile)
@@ -112,8 +111,8 @@ sub generate_functions {
       #generate pbc for this test (may be overriden)
       $pbc_generator->( $assembly, $directory, $count );
 
-      my $by_f = per_test('pbc',$count);
-      my $out_f = per_test('out',$count);
+      my $by_f = per_test('.pbc',$count);
+      my $out_f = per_test('.out',$count);
 
       $TEST_PROG_ARGS = "" unless defined $TEST_PROG_ARGS;
       _run_command( "${directory}$PConfig{test_prog} ${TEST_PROG_ARGS} $by_f", 
'STDOUT' => $out_f, 'STDERR' => $out_f);
@@ -153,11 +152,11 @@ sub generate_functions {
 
       $output =~ s/\cM\cJ/\n/g;
       local( *SOURCE );
-      my $source_f = per_test('c',$count);
+      my $source_f = per_test('.c',$count);
       my $obj_f = per_test($PConfig{o},$count);
       my $exe_f = per_test($PConfig{exe},$count);
       $exe_f =~ s@[\\/:]@$PConfig{slash}@g;
-      my $out_f = per_test('out',$count);
+      my $out_f = per_test('.out',$count);
 
       open SOURCE, "> $source_f" or die "Unable to open '$source_f'";
       binmode SOURCE;

Reply via email to