[svk-commit] r2607 - branches/bm/t/bm

nobody at bestpractical.com nobody at bestpractical.com
Thu Nov 15 03:39:22 EST 2007


Author: clsung
Date: Thu Nov 15 03:39:20 2007
New Revision: 2607

Modified:
   branches/bm/t/bm/move.t

Log:
- verbose output comparison of t/bm/move.t

Modified: branches/bm/t/bm/move.t
==============================================================================
--- branches/bm/t/bm/move.t	(original)
+++ branches/bm/t/bm/move.t	Thu Nov 15 03:39:20 2007
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 use strict;
-use Test::More tests => 8;
+use Test::More tests => 13;
 use SVK::Test;
 use File::Path;
 
@@ -17,25 +17,72 @@
 $svk->mirror('//mirror/MyProject', $uri);
 $svk->sync('//mirror/MyProject');
 
+my $trunk = '/mirror/MyProject/trunk';
 my ($copath, $corpath) = get_copath ('MyProject');
-$svk->checkout('//mirror/MyProject/trunk',$copath);
+$svk->checkout('/'.$trunk,$copath);
 chdir($copath);
 
-is_output_like ($svk, 'branch', ['--create', 'feature/foo'], qr'Project branch created: feature/foo');
-is_output_like ($svk, 'branch', ['--list'], qr'feature/foo');
-$svk->br('--move', 'feature/foo', 'release-ready/bar');
-is_output_like ($svk, 'branch', ['--list'], qr'release-ready/bar');
-$svk->br('--move', 'release-ready/bar', 'feature/');
-is_output_like ($svk, 'branch', ['--list'], qr'feature/bar');
-is_output_like ($svk, 'branch', ['--create', 'feature/moo'], qr'Project branch created: feature/moo');
-$svk->br('--move', 'feature/moo', 'feature/mar');
+is_output ($svk, 'branch', ['--create', 'feature/foo'],
+    ["Merging back to mirror source $uri.",
+     "Merge back committed as revision 6.",
+     "Syncing $uri",
+     'Retrieving log information from 6 to 6',
+     'Committed revision 7 from revision 6.',
+     'Project branch created: feature/foo ']);
+is_output ($svk, 'branch', ['--list'], ['feature/foo']);
+
+is_output ($svk, 'branch', ['--move', 'feature/foo', 'release-ready/bar'],
+    ["Merging back to mirror source $uri.",
+     "Merge back committed as revision 7.",
+     "Syncing $uri",
+     "Retrieving log information from 7 to 7",
+     "Committed revision 8 from revision 7."]);
+is_output ($svk, 'branch', ['--list'], ['release-ready/bar']);
+
+is_output ($svk, 'branch', ['--move', 'release-ready/bar', 'feature/'],
+    ["Merging back to mirror source $uri.",
+     "Merge back committed as revision 8.",
+     "Syncing $uri",
+     "Retrieving log information from 8 to 8",
+     "Committed revision 9 from revision 8."]);
+is_output ($svk, 'branch', ['--list'], ['feature/bar']);
+
+is_output ($svk, 'branch', ['--create', 'feature/moo'],
+    ["Merging back to mirror source $uri.",
+     "Merge back committed as revision 9.",
+     "Syncing $uri",
+     'Retrieving log information from 9 to 9',
+     'Committed revision 10 from revision 9.',
+     'Project branch created: feature/moo ']);
+is_output ($svk, 'branch', ['--move', 'feature/moo', 'feature/mar'],
+    ["Merging back to mirror source $uri.",
+     "Merge back committed as revision 10.",
+     "Syncing $uri",
+     "Retrieving log information from 10 to 10",
+     "Committed revision 11 from revision 10."]);
 is_output_unlike ($svk, 'branch', ['--list'], qr'feature/moo');
 
 # create to local and move back
-is_output_like ($svk, 'branch', ['--create', 'localfoo', '--local', '--switch-to'],
-    qr'Project branch created: localfoo \(in local\)');
+is_output ($svk, 'branch', ['--create', 'localfoo', '--local', '--switch-to'],
+    ["Committed revision 12.",
+     "Project branch created: localfoo (in local)",
+     'Syncing /'."$trunk($trunk) in ".__($corpath).' to 12.']);
+
+is_output ($svk, 'branch', ['--move', 'feature/remotebar'],
+    ["Merging back to mirror source $uri.",
+     "Merge back committed as revision 11.",
+     "Syncing $uri",
+     "Retrieving log information from 11 to 11",
+     "Committed revision 13 from revision 11.",
+     'Auto-merging (0, 12) /local/MyProject/localfoo to /mirror/MyProject/branches/feature/remotebar (base /mirror/MyProject/trunk:6).',
+     '===> Auto-merging (0, 12) /local/MyProject/localfoo to /mirror/MyProject/branches/feature/remotebar (base /mirror/MyProject/trunk:6).',
+     "Merging back to mirror source $uri.",'Empty merge.',
+     "Committed revision 14."]);
+
+is_output ($svk, 'branch', ['--switch', 'feature/remotebar'],
+    ["Syncing //local/MyProject/localfoo(/local/MyProject/localfoo) in ".
+      __($corpath)." to 14."]);
 
-$svk->br('--move', 'feature/remotebar');
-$svk->br('--switch', 'feature/remotebar');
-is_output_like ($svk, 'branch', ['--list'], qr'feature/remotebar',
+is_output ($svk, 'branch', ['--list'],
+    ['feature/bar','feature/mar','feature/remotebar'],
     'Move localfoo to remotebar, cross depot move');


More information about the svk-commit mailing list