[svk-commit] r2721 - trunk/t/bm

nobody at bestpractical.com nobody at bestpractical.com
Tue Apr 1 02:29:48 EDT 2008


Author: clsung
Date: Tue Apr  1 02:29:47 2008
New Revision: 2721

Modified:
   trunk/t/bm/merge.t
   trunk/t/bm/switch.t

Log:
- add --swtich trunk test in switch.t
- test br --push in bm/merge.t
  - a TODO: --push --from should accept branches/tags name

Modified: trunk/t/bm/merge.t
==============================================================================
--- trunk/t/bm/merge.t	(original)
+++ trunk/t/bm/merge.t	Tue Apr  1 02:29:47 2008
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 use strict;
-use Test::More tests => 21;
+use Test::More tests => 23;
 use SVK::Test;
 use File::Path;
 
@@ -189,3 +189,24 @@
      'Merge back committed as revision 23.', "Syncing $uri",
      'Retrieving log information from 23 to 23',
      'Committed revision 24 from revision 23.']);
+
+my $branch_foo3 = '/mirror/MyProject/branches/merge/foo3';
+$svk->branch ('--create', 'merge/foo3', '--switch-to');
+append_file ('B/S/Q/qu', "\nappend CBA on foo3\n");
+$svk->commit ('-m', 'commit message here (r26)','');
+
+$svk->branch ('--switch', 'trunk');
+is_output ($svk, 'branch', ['--merge', '-C', 'merge/foo3', '.'], 
+    ["Auto-merging (0, 26) $branch_foo3 to $trunk (base $trunk:21).",
+     "Checking locally against mirror source $uri.", 'U   B/S/Q/qu',
+     qr'New merge ticket: [\w\d-]+:/branches/merge/foo3:25']);
+TODO: {
+local $TODO = 'in push, --from should specify branch(tag) name instead of depotpath';
+is_output ($svk, 'branch', ['--push', '-C', '--from', 'merge/foo3'],
+    ["Auto-merging (0, 26) $branch_foo3 to $trunk (base $trunk:21).",
+     "===> Auto-merging (0, 25) $branch_foo3 to $trunk (base $trunk:21).",
+     "Empty merge.",
+     "===> Auto-merging (25, 26) $branch_foo3 to $trunk (base $trunk:21).",
+     'U   B/S/Q/qu',
+     qr'New merge ticket: [\w\d-]+:/branches/merge/foo3:25']);
+ }

Modified: trunk/t/bm/switch.t
==============================================================================
--- trunk/t/bm/switch.t	(original)
+++ trunk/t/bm/switch.t	Tue Apr  1 02:29:47 2008
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 use strict;
-use Test::More tests => 5;
+use Test::More tests => 6;
 use SVK::Test;
 use File::Path;
 
@@ -32,3 +32,5 @@
     qr'Project branch created: feature/foobar \(in local\)');
 is_output_like ($svk, 'info', [], qr'Copied From: /mirror/MyProject/trunk, Rev. \d+');
 
+$svk->branch('--switch','trunk');
+is_output_like ($svk, 'info', [], qr'Depot Path: //mirror/MyProject/trunk');


More information about the svk-commit mailing list