Author: jkeenan
Date: Fri Jul 25 18:32:54 2008
New Revision: 29745

Modified:
   branches/parallel/config/gen/crypto.pm
   branches/parallel/t/steps/gen_crypto-01.t

Log:
Pull hard-coded strings holding names of source files into _init(), then modify 
tests appropriately.

Modified: branches/parallel/config/gen/crypto.pm
==============================================================================
--- branches/parallel/config/gen/crypto.pm      (original)
+++ branches/parallel/config/gen/crypto.pm      Fri Jul 25 18:32:54 2008
@@ -48,6 +48,7 @@
             version_needed => '0.9.8a',
         },
     };
+    $data{digest_pmc_template} = 'config/gen/crypto/digest_pmc.in';
     return \%data;
 }
 
@@ -77,7 +78,7 @@
             : '#ifndef OPENSSL_NO_' . $md
         );
         $conf->genfile(
-            'config/gen/crypto/digest_pmc.in' => "src/dynpmc/${file}.pmc",
+            $self->{digest_pmc_template} => "src/dynpmc/${file}.pmc",
             comment_type                      => '/*',
         );
     }

Modified: branches/parallel/t/steps/gen_crypto-01.t
==============================================================================
--- branches/parallel/t/steps/gen_crypto-01.t   (original)
+++ branches/parallel/t/steps/gen_crypto-01.t   Fri Jul 25 18:32:54 2008
@@ -35,6 +35,9 @@
 $conf->add_steps($pkg);
 $conf->options->set( %{$args} );
 my $step = test_step_constructor_and_description($conf);
+
+ok(-f $step->{digest_pmc_template}, "Able to locate source code file");
+
 my $has_crypto_orig = $conf->data->get('has_crypto');
 $conf->data->set( has_crypto => undef );
 my $ret = $step->runstep($conf);
@@ -46,17 +49,6 @@
 
 $conf->replenish($serialized);
 
-#$args = process_options(
-#    {
-#        argv => [ ],
-#        mode => q{configure},
-#    }
-#);
-#$step = test_step_constructor_and_description($conf);
-ok(-f 'config/gen/crypto/digest_pmc.in',
-    "Able to locate source code file");
-
-
 pass("Completed all tests in $0");
 
 ################### DOCUMENTATION ###################

Reply via email to