[Bps-public-commit] r13515 - in Shipwright/trunk: t t/hello

sunnavy at bestpractical.com sunnavy at bestpractical.com
Sat Jun 21 03:04:10 EDT 2008


Author: sunnavy
Date: Sat Jun 21 03:04:10 2008
New Revision: 13515

Modified:
   Shipwright/trunk/   (props changed)
   Shipwright/trunk/t/71.script_cmds.t
   Shipwright/trunk/t/hello/svk.t
   Shipwright/trunk/t/hello/svn.t

Log:
 r13599 at sunnavys-mb:  sunnavy | 2008-06-20 21:13:55 +0800
 use Test::More->builder->expected_tests instead of manually modify test numbers


Modified: Shipwright/trunk/t/71.script_cmds.t
==============================================================================
--- Shipwright/trunk/t/71.script_cmds.t	(original)
+++ Shipwright/trunk/t/71.script_cmds.t	Sat Jun 21 03:04:10 2008
@@ -11,7 +11,7 @@
 Shipwright::Test->init;
 
 SKIP: {
-    skip "no svn found", 20
+    skip "no svn found", Test::More->builder->expected_tests / 2
       unless has_svn();
 
     my $repo = 'svn:' . create_svn_repo() . '/hello';
@@ -20,7 +20,7 @@
 }
 
 SKIP: {
-    skip "no svk and svnadmin found", 20,
+    skip "no svk and svnadmin found", Test::More->builder->expected_tests / 2,
       unless has_svk();
 
     create_svk_repo();
@@ -106,8 +106,7 @@
         'list the repo',
     );
 
-
-# test rename
+    # test rename
     test_cmd(
         $repo,
         [
@@ -125,7 +124,7 @@
         'list the repo',
     );
 
-    for ( [ '--name', 'foo', '--new-name' ], [ '--name' ], ) {
+    for ( [ '--name', 'foo', '--new-name' ], ['--name'], ) {
         my $prefix = '';
         $prefix = 'new-' if "@$_" =~ /foo/;
         test_cmd(
@@ -134,12 +133,13 @@
         );
     }
 
-    for ( [ '--name', 'foo' ], [ ], ) {
+    for ( [ '--name', 'foo' ], [], ) {
         my $prefix = '';
         $prefix = 'new-' if "@$_" =~ /foo/;
         test_cmd(
             $repo, [ $sw, 'rename', '-r', $repo, @$_, ],
-            undef, undef, qr/need ${prefix}name arg/,
+            undef, undef,
+            qr/need ${prefix}name arg/,
             "rename without ${prefix}name arg",
         );
     }
@@ -158,7 +158,7 @@
     test_cmd(
         $repo,
         [
-            $sw,      'rename',     '-r',         $repo,
+            $sw,      'rename',   '-r',         $repo,
             '--name', 'NonExist', '--new-name', 'foo'
         ],
         undef, undef,
@@ -166,20 +166,18 @@
         'rename nonexist dist',
     );
 
-# now the dist is renamed to 'foo'
+    # now the dist is renamed to 'foo'
 
     test_cmd(
         $repo,
-        [
-            $sw,      'delete',     '-r',         $repo,
-            '--name', 'foo'
-        ],
+        [ $sw, 'delete', '-r', $repo, '--name', 'foo' ],
         qr/deleted foo with success/,
         'deleted foo',
     );
 
     test_cmd(
-        $repo, [ $sw, 'list', '-r', $repo, '--name', 'foo' ],
+        $repo,
+        [ $sw, 'list', '-r', $repo, '--name', 'foo' ],
         qr/foo doesn't exist/,
         "foo is deleted"
     );

Modified: Shipwright/trunk/t/hello/svk.t
==============================================================================
--- Shipwright/trunk/t/hello/svk.t	(original)
+++ Shipwright/trunk/t/hello/svk.t	Sat Jun 21 03:04:10 2008
@@ -12,7 +12,7 @@
 use Shipwright::Test qw/has_svk create_svk_repo/;
 
 SKIP: {
-    skip "no svk and svnadmin found", 41
+    skip "no svk and svnadmin found", Test::More->builder->expected_tests
       unless has_svk();
 
     my $cwd = getcwd;

Modified: Shipwright/trunk/t/hello/svn.t
==============================================================================
--- Shipwright/trunk/t/hello/svn.t	(original)
+++ Shipwright/trunk/t/hello/svn.t	Sat Jun 21 03:04:10 2008
@@ -11,7 +11,7 @@
 use Shipwright::Test qw/has_svn create_svn_repo/;
 
 SKIP: {
-    skip "no svn found", 17
+    skip "no svn found", Test::More->builder->expected_tests
       unless has_svn();
 
     my $cwd = getcwd;



More information about the Bps-public-commit mailing list