[Bps-public-commit] r15302 - in Shipwright/branches/1.10: .

sunnavy at bestpractical.com sunnavy at bestpractical.com
Wed Aug 20 11:54:50 EDT 2008


Author: sunnavy
Date: Wed Aug 20 11:54:46 2008
New Revision: 15302

Modified:
   Shipwright/branches/1.10/MANIFEST
   Shipwright/branches/1.10/t/05.util.t
   Shipwright/branches/1.10/t/07.script.t
   Shipwright/branches/1.10/t/71.script_cmds.t
   Shipwright/branches/1.10/t/99.kwalitee.t

Log:
merged 15300:25301 to 1.1

Modified: Shipwright/branches/1.10/MANIFEST
==============================================================================
--- Shipwright/branches/1.10/MANIFEST	(original)
+++ Shipwright/branches/1.10/MANIFEST	Wed Aug 20 11:54:46 2008
@@ -1,6 +1,5 @@
 bin/shipwright
 Changes
-docs/tutorial.log
 inc/Module/AutoInstall.pm
 inc/Module/Install.pm
 inc/Module/Install/AutoInstall.pm

Modified: Shipwright/branches/1.10/t/05.util.t
==============================================================================
--- Shipwright/branches/1.10/t/05.util.t	(original)
+++ Shipwright/branches/1.10/t/05.util.t	Wed Aug 20 11:54:46 2008
@@ -46,8 +46,8 @@
 ( undef, $err ) = Shipwright::Util->run( [ 'ls', 'lalala' ], 1 );
 like(
     $err,
-    qr/no such file/i,
-    "run 'ls lalala' get 'no file' warning if ignore_failure"
+    qr/ls:/i,
+    "run 'ls lalala' get warning if ignore_failure"
 );
 
 my $hashref = { foo => 'bar' };

Modified: Shipwright/branches/1.10/t/07.script.t
==============================================================================
--- Shipwright/branches/1.10/t/07.script.t	(original)
+++ Shipwright/branches/1.10/t/07.script.t	Wed Aug 20 11:54:46 2008
@@ -5,6 +5,7 @@
 
 use Shipwright::Script;
 use Shipwright;
+use Shipwright::Test;
 
 is_deeply(
     { del => 'delete', ls => 'list', up => 'update' },
@@ -17,21 +18,19 @@
 
 my %argv = (
     'passed nothing will get a help' => [],
-    'passed -h will get a help'  => ['-h'],
+    'passed -h will get a help'      => ['-h'],
     'passed --help will get a help'  => ['--help'],
 );
 
 for my $msg ( keys %argv ) {
     @ARGV = @{ $argv{$msg} };
     my $cmd = Shipwright::Script->prepare();
-    isa_ok($cmd, 'Shipwright::Script::Help' )
+    isa_ok( $cmd, 'Shipwright::Script::Help' );
 }
 
 my %wrong_argv = (
-    'Unknown option: (r|repository)' => [
-        [ 'ls', '-r' ],
-        [ 'ls', '--repository' ],
-    ],
+    'Unknown option: (r|repository)' =>
+      [ [ 'ls', '-r' ], [ 'ls', '--repository' ], ],
     'need repository arg' => [ ['ls'] ],
     'invalid repository' => [
         [ 'ls', '-r', 'lalal' ],
@@ -42,8 +41,17 @@
 
 for my $msg ( keys %wrong_argv ) {
     for my $v ( @{ $wrong_argv{$msg} } ) {
-        eval { @ARGV = @$v; Shipwright::Script->prepare };
-        like( $@, qr/$msg/, $msg );
+        if ( $v->[2] && $v->[2] =~ /^svn/ ) {
+          SKIP: {
+                skip 'no svn found', 1 unless has_svn;
+                eval { @ARGV = @$v; Shipwright::Script->prepare };
+                like( $@, qr/$msg/, $msg );
+            }
+        }
+        else {
+            eval { @ARGV = @$v; Shipwright::Script->prepare };
+            like( $@, qr/$msg/, $msg );
+        }
     }
 }
 

Modified: Shipwright/branches/1.10/t/71.script_cmds.t
==============================================================================
--- Shipwright/branches/1.10/t/71.script_cmds.t	(original)
+++ Shipwright/branches/1.10/t/71.script_cmds.t	Wed Aug 20 11:54:46 2008
@@ -310,7 +310,7 @@
             my $cmd = shift @{ $item->[0] };
             test_cmd(
                 $repo,
-                [ $sw, $cmd, '-r', $repo, @{ $item->[0] }, ],
+                [ $^X, $sw, $cmd, '-r', $repo, @{ $item->[0] }, ],
                 @$item[ 1 .. $#$item ],
             );
         }

Modified: Shipwright/branches/1.10/t/99.kwalitee.t
==============================================================================
--- Shipwright/branches/1.10/t/99.kwalitee.t	(original)
+++ Shipwright/branches/1.10/t/99.kwalitee.t	Wed Aug 20 11:54:46 2008
@@ -1,4 +1,3 @@
 use Test::More;
-
-eval { require Test::Kwalitee; Test::Kwalitee->import };
+eval { use Test::Kwalitee 1.01; };
 plan( skip_all => 'Test::Kwalitee not installed; skipping' ) if $@;



More information about the Bps-public-commit mailing list