[svk-commit] r2844 - branches/path-resolver/t/smerge/path-resolver

nobody at bestpractical.com nobody at bestpractical.com
Fri May 9 12:37:47 EDT 2008


Author: ruz
Date: Fri May  9 12:37:47 2008
New Revision: 2844

Modified:
   branches/path-resolver/t/smerge/path-resolver/change_in_deleted_file.t

Log:
* add more tests

Modified: branches/path-resolver/t/smerge/path-resolver/change_in_deleted_file.t
==============================================================================
--- branches/path-resolver/t/smerge/path-resolver/change_in_deleted_file.t	(original)
+++ branches/path-resolver/t/smerge/path-resolver/change_in_deleted_file.t	Fri May  9 12:37:47 2008
@@ -2,7 +2,7 @@
 
 use strict;
 
-use Test::More tests => 3;
+use Test::More tests => 6;
 use SVK::Test;
 
 # the source has a change in a file that is deleted in the target
@@ -28,6 +28,27 @@
 $svk->sm ('-m', 'smerge', '//trunk', '//local');
 $svk->rm ('-m', 'rm the file on local', '//local/a_file');
 
+# cleanup repo state
+sub cleanup_repo_state {
+    $svk->rm ('-m', 'rm on local', '//local/a_file');
+    $svk->rm ('-m', 'rm on trunk', '//trunk/a_file');
+
+    $svk->up ($copath);
+    append_file ("$copath/ticket_forcer", "tick\n");
+    $svk->commit ('-m', 'update ticket forcer', "$copath");
+    $svk->smerge ('-m', 'smerge', '//trunk', '//local');
+
+    $svk->up ($copath);
+    overwrite_file ("$copath/a_file", "a file\n");
+    $svk->add ("$copath/a_file");
+    $svk->commit ('-m', 'add file', "$copath");
+    $svk->smerge ('-m', 'smerge', '//trunk', '//local');
+
+    $svk->rm ('-m', 'rm on local again', '//local/a_file');
+
+    $svk->up ($copath);
+}
+
 # test change of a file in src when file doesn't exist in dst with a)dd resolver action
 {
     append_file ("$copath/a_file", "a change\n");
@@ -52,3 +73,27 @@
     );
 }
 
+cleanup_repo_state();
+
+# test change of a file in src when file doesn't exist in dst with s)kip resolver action
+{
+    append_file ("$copath/a_file", "a change\n");
+    $svk->commit ('-m', 'change a file', "$copath");
+
+    is_output ($svk, 'smerge', ['-C', '//trunk', '//local'],
+    	   ['Auto-merging (13, 16) /trunk to /local (base /trunk:13).',
+    	    __"C   a_file",
+    	    "Empty merge.",
+            "1 conflict found."
+    	   ]);
+    $answer = ['s'];
+    is_output ($svk, 'smerge', ['-m', 'skip file change', '//trunk', '//local'],
+    	   ['Auto-merging (13, 16) /trunk to /local (base /trunk:13).',
+    	    "New merge ticket: $uuid:/trunk:16",
+            "Committed revision 17."
+    	   ]);
+    is_output ($svk, 'cat', ['//local/a_file'],
+        ["Filesystem has no item: File not found: revision 17, path '/local/a_file'"]
+    );
+}
+


More information about the svk-commit mailing list