[svn:parrot] r40005 - branches/darwin2hints/t/steps/init/hints

jkeenan at svn.parrot.org jkeenan at svn.parrot.org
Sat Jul 11 23:26:54 UTC 2009


Author: jkeenan
Date: Sat Jul 11 23:26:52 2009
New Revision: 40005
URL: https://trac.parrot.org/parrot/changeset/40005

Log:
Test untested branch in _strip_ldl_as_needed().

Modified:
   branches/darwin2hints/t/steps/init/hints/darwin-01.t

Modified: branches/darwin2hints/t/steps/init/hints/darwin-01.t
==============================================================================
--- branches/darwin2hints/t/steps/init/hints/darwin-01.t	Sat Jul 11 19:01:59 2009	(r40004)
+++ branches/darwin2hints/t/steps/init/hints/darwin-01.t	Sat Jul 11 23:26:52 2009	(r40005)
@@ -5,10 +5,10 @@
 
 use strict;
 use warnings;
-use Test::More;
-plan( skip_all => 'only needs testing on Darwin' ) unless $^O =~ /darwin/i;
-plan( tests =>  26 );
-#use Test::More qw(no_plan); # tests => 26;
+#use Test::More;
+#plan( skip_all => 'only needs testing on Darwin' ) unless $^O =~ /darwin/i;
+#plan( tests =>  26 );
+use Test::More qw(no_plan); # tests => 26;
 
 use lib qw( lib t/configure/testlib );
 use_ok('config::init::defaults');
@@ -188,16 +188,27 @@
 ##### _strip_ldl_as_needed #####
 
 {
-    my $major = '7.99.11';
-    local $init::hints::darwin::defaults{uname} = $major;
     my $oldflag = $conf->data->get( 'libs ' );
+    my ( $major, $libs );
+
+    $major = '7.99.11';
+    local $init::hints::darwin::defaults{uname} = $major;
     $conf->data->set( libs => '-somelib -ldl -someotherlib' );
-    my $libs = init::hints::darwin::_strip_ldl_as_needed(
+    $libs = init::hints::darwin::_strip_ldl_as_needed(
         $conf->data->get( 'libs' )
     );
     like( $libs, qr/-somelib\s+-someotherlib/,
         "_strip_ldl_as_needed(): '-ldl' stripped as expected" );
 
+    $major = '6.99.11';
+    local $init::hints::darwin::defaults{uname} = $major;
+    $conf->data->set( libs => '-somelib -ldl -someotherlib' );
+    $libs = init::hints::darwin::_strip_ldl_as_needed(
+        $conf->data->get( 'libs' )
+    );
+    like( $libs, qr/-somelib\s+-ldl\s+-someotherlib/,
+        "_strip_ldl_as_needed(): '-ldl' not stripped as expected in older darwin" );
+
     $conf->data->set( libs => $oldflag );
 }
 


More information about the parrot-commits mailing list