=== t/03import.t
==================================================================
--- t/03import.t   (/svk/trunk)   (revision 11244)
+++ t/03import.t   (/svk/improved-tests)   (local)
@@ -3,7 +3,7 @@
 use Test::More;
 BEGIN { require 't/tree.pl' };
 eval { require SVN::Mirror; 1 } or plan skip_all => 'require SVN::Mirror';
-plan tests => 19;
+plan tests => 20;
 
 use Cwd;
 use File::Path;
@@ -38,6 +38,9 @@
 unlink "$copath/fileb";
 
 $svk->import ('-m', 'test import', '//import', $copath);
+is_output ($svk, 'import', ['-m', 'test import into file', '//import/filec', $copath], 
+	   [qr'^import destination cannot be a file at ']);
+
 unlink "$copath/filec";
 $svk->import ('-t', '-m', 'import -t', '//import', $copath);
 ok($xd->{modified}, 'will update svk config');
@@ -68,7 +71,9 @@
 rmtree ["$copath/dir"];
 
 overwrite_file ("$copath/dir", "now file\n");
+$svk->import ('-C', '-f', '//import', $copath);
 $svk->import ('-f', '-m', 'import -f', '//import', $copath);
+
 rmtree [$copath];
 $svk->checkout ('//import', $copath);
 ok (-f copath ('dir'));
=== t/05svm-head.t
==================================================================
--- t/05svm-head.t   (/svk/trunk)   (revision 11244)
+++ t/05svm-head.t   (/svk/improved-tests)   (local)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
 BEGIN { require 't/tree.pl' };
-plan_svm tests => 2;
+plan_svm tests => 4;
 our $output;
 
 # build another tree to be mirrored ourself
@@ -29,3 +29,11 @@
 	   ["Syncing $uri/A",
 	    'Retrieving log information from 2 to 2',
 	    'Committed revision 6 from revision 2.']);
+
+$svk->mirror ('//test-Z', "$uri/Z");
+
+is_output ($svk, 'sync', ['--skipto', 'HEAD', '-a'],
+	   [qr'^argument skipto not allowed when multiple target specified at ']);
+is_output ($svk, 'sync', ['--skipto', 'HEAD', '//test-A', '//test-Z'],
+	   [qr'^argument skipto not allowed when multiple target specified at ']);
+
=== t/05svm-move.t
==================================================================
--- t/05svm-move.t   (/svk/trunk)   (revision 11244)
+++ t/05svm-move.t   (/svk/improved-tests)   (local)
@@ -5,7 +5,7 @@
 
 BEGIN { require 't/tree.pl' };
 eval { require SVN::Mirror; 1 } or plan skip_all => 'require SVN::Mirror';
-plan tests => 6;
+plan tests => 9;
 
 # build another tree to be mirrored ourself
 my ($xd, $svk) = build_test('mv_test');
@@ -14,29 +14,41 @@
 
 my $uri = uri($test_repospath);
 $svk->mirror ('//mv/m', $uri.($test_a_path eq '/' ? '' : $test_a_path));
+is_output ($svk, 'propget', ['svm:mirror', '//'], ['/mv/m']);
 
 TODO: {
     local $TODO = "Update the svm:mirror property when moving mirrored paths";
 
-    $svk->move ('-m', 'moving mirrored path', '//mv/m', '//mv/m2');
-    is_output_like ($svk, 'propget', ['svm:mirror', '//'], qr'//mv/m2');
+    $svk->copy ('-m', 'copying mirrored path', '//mv/m', '//mv/m-C');
+    is_output ($svk, 'propget', ['svm:mirror', '//'], ['/mv/m', '/mv/m-C']);
 
-    $svk->move ('-m', 'moving tree containing mirrored path', '//mv', '//mv2');
-    is_output_like ($svk, 'propget', ['svm:mirror', '//'], qr'//mv2/m2');
+    $svk->copy ('-m', 'copying tree containing mirrored path', '//mv', '//mv-C');
+    is_output ($svk, 'propget', ['svm:mirror', '//'], ['/mv/m', '/mv/m-C', '/mv-C/m', '/mv-C/m-C']);
 
-    $svk->copy ('-m', 'copying mirrored path', '//mv2/m2', '//mv2/m-C');
-    is_output_like ($svk, 'propget', ['svm:mirror', '//'], qr'//mv2/m-C');
 
-    $svk->copy ('-m', 'copying tree containing mirrored path', '//mv2', '//mv-C');
-    is_output_like ($svk, 'propget', ['svm:mirror', '//'], qr'//mv-C/m2');
+    $svk->move ('-m', 'moving mirrored path', '//mv/m-C', '//mv/m2');
+    is_output ($svk, 'propget', ['svm:mirror', '//'], ['/mv/m', '/mv/m2', '/mv-C/m', '/mv-C/m-C']);
 
-    SKIP: {
-        skip($TODO, 2);
+    $svk->move ('-m', 'moving tree containing mirrored path', '//mv-C', '//mv2');
+    is_output ($svk, 'propget', ['svm:mirror', '//'], ['/mv/m', '/mv/m2', '/mv2/m', '/mv2/m-C']);
 
-	$svk->remove ('-m', 'removing mirrored path', '//mv2/m2');
-	is_output_like ($svk, 'propget', ['svm:mirror', '//'], qr{^(?!.*//mv2/m2)});
 
-	$svk->remove ('-m', 'removing tree containing mirrored path', '//mv-C');
-	is_output_like ($svk, 'propget', ['svm:mirror', '//'], qr{^(?!.*//mv-C/m2)});
-    }
+    $svk->remove ('-m', 'removing mirrored path', '//mv2/m');
+    is_output ($svk, 'propget', ['svm:mirror', '//'], ['/mv/m', '/mv/m2', '/mv2/m']);
+
+    $svk->remove ('-m', 'removing tree containing mirrored path', '//mv');
+    is_output ($svk, 'propget', ['svm:mirror', '//'], ['/mv2/m']);
 }
+
+TODO: {
+    local $TODO = "Duplicate mirror metadata onto the new headrev when after moving a mirror";
+
+    # Whereas the preceding tests ensure that the svm:mirror property is
+    # correctly managed, this test is to ensure that mirror metadata is
+    # transferred to the destination's revprops... the detach will fail,
+    # believing the path to not be a mirror, if this isn't the case.
+    is_output ($svk, 'mirror', ['-d', '//mv2/m-C'], 
+        [qr'Committed revision \d+\.', 
+         "Mirror path '//mv2/m-C' detached."]);
+    is_output ($svk, 'propget', ['svm:mirror', '//'], []);
+}
=== t/07smerge-external.t
==================================================================
--- t/07smerge-external.t   (/svk/trunk)   (revision 11244)
+++ t/07smerge-external.t   (/svk/improved-tests)   (local)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 use strict;
-use Test::More tests => 24;
+use Test::More tests => 25;
 BEGIN { require 't/tree.pl' };
 
 our ($answer, $output);
@@ -14,6 +14,7 @@
 $svk->co ('//trunk', $copath);
 overwrite_file ("$copath/test.pl", "#!/usr/bin/perl -w\nsub { 'this is sub' }\n#common\n#common2\n\n\n");
 $svk->add ("$copath/test.pl");
+$svk->ps ("svn:eol-style", "native", "$copath/test.pl");
 $svk->commit ('-m', 'test.pl', $copath);
 
 $svk->cp ('-m', 'local branch of trunk', '//trunk', '//local');
@@ -48,6 +49,19 @@
 
 $answer = 't'; # theirs
 $svk->sm ('-m', 'merge from trunk to local', '//trunk', '//local');
+# TODO: Don't stuff up line endings (currently problematic on Win32)
+is_output ($svk, 'diff', ["//trunk/test.pl", "//local/test.pl"],
+	   [__"=== test.pl",
+	    "==================================================================",
+	    "--- test.pl   (/trunk/test.pl)   (revision 6)",
+	    "+++ test.pl   (/local/test.pl)   (revision 6)",
+	    __('@@ -6,3 +6,5 @@'),
+	    " #common2",
+	    " ",
+	    " ",
+	    "+#trunk",
+	    "+trunk additions (do not kill!)",
+	   ], 'svk-merge mine');
 is_output ($svk, 'up', ["$copath"],
 	   ["Syncing //local(/local) in $corpath to 6.",
 	    __"g   $copath/test.pl"], 'svk-merge theirs');
=== t/12copy.t
==================================================================
--- t/12copy.t   (/svk/trunk)   (revision 11244)
+++ t/12copy.t   (/svk/improved-tests)   (local)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
 BEGIN { require 't/tree.pl' };
-plan_svm tests => 49;
+plan_svm tests => 50;
 
 our ($output, $answer);
 my ($xd, $svk) = build_test('foo');
@@ -152,6 +152,7 @@
 is_output ($svk, 'status', [$copath],
 	   [__("A + $copath/me-cocopied")]
 	  );
+is_output ($svk, 'cp', ["$copath/me", "$copath/me-cocopied"], [__("Path $copath/me-cocopied already exists.")]);
 
 $svk->commit ('-m', 'commit copied file in mirrored path', $copath);
 is_copied_from ("/foo/me-cocopied", '/me', 2);
=== t/14move.t
==================================================================
--- t/14move.t   (/svk/trunk)   (revision 11244)
+++ t/14move.t   (/svk/improved-tests)   (local)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-use Test::More tests => 13;
+use Test::More tests => 14;
 use strict;
 our $output;
 BEGIN { require 't/tree.pl' };
@@ -72,3 +72,9 @@
 	    __('A   new_dir/new_add')]);
 is_output ($svk, 'mv', ['new_dir/new_add', 'new_dir/new_add.bz'],
 	   [__"$corpath/B/new_dir is modified."]);
+
+$svk->commit ('-m', 'commit everything');
+overwrite_file ('new_dir/unknown_file', "unknown file\n");
+is_output ($svk, 'mv', ['new_dir', 'new_dir_mv'], 
+		[__"$corpath/B/new_dir/unknown_file is missing."]);
+
=== t/21delete.t
==================================================================
--- t/21delete.t   (/svk/trunk)   (revision 11244)
+++ t/21delete.t   (/svk/improved-tests)   (local)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-use Test::More tests => 13;
+use Test::More tests => 14;
 use strict;
 use File::Path;
 BEGIN { require 't/tree.pl' };
@@ -31,6 +31,12 @@
 
 $svk->revert ('-R', '.');
 
+is_output ($svk, 'delete', ['A/foo', 'A/bar'],
+		[__('D   A/foo'),
+		 __('D   A/bar')]);
+
+$svk->revert ('-R', '.');
+
 is_output ($svk, 'delete', ['--keep-local', 'A/foo'],
 	   [__('D   A/foo')], '');
 ok (-e 'A/foo', 'copath not deleted');
=== t/23commit.t
==================================================================
--- t/23commit.t   (/svk/trunk)   (revision 11244)
+++ t/23commit.t   (/svk/improved-tests)   (local)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
 BEGIN { require 't/tree.pl' };
-plan tests => 44;
+plan tests => 45;
 
 our $output;
 my ($xd, $svk) = build_test();
@@ -104,6 +104,12 @@
 overwrite_file ("A/forimport/baz", "fnord");
 overwrite_file ("A/forimport/ss..", "fnord");
 
+# XXX - This doesn't output anything!?!
+is_output ($svk, 'commit', ['-C', '--import', '-m', 'commit --import',
+			    'A/forimport', 'A/forimport/foo', 'A/forimport/bar', 'A/forimport/baz',
+			    'A/barnew', 'A/forimport/ss..'],
+	   []);
+
 is_output ($svk, 'commit', ['--import', '-m', 'commit --import',
 			    'A/forimport', 'A/forimport/foo', 'A/forimport/bar', 'A/forimport/baz',
 			    'A/barnew', 'A/forimport/ss..'],
=== t/24diff.t
==================================================================
--- t/24diff.t   (/svk/trunk)   (revision 11244)
+++ t/24diff.t   (/svk/improved-tests)   (local)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-use Test::More tests => 21;
+use Test::More tests => 22;
 use strict;
 require 't/tree.pl';
 our $output;
@@ -183,6 +183,16 @@
             '___________________________________________________________________',
             'Name: svn:mime-type',
             ' +image/png',], 'diff - rN copath (changed)');
+is_sorted_output ($svk, 'diff', ['-sr1:2', '//A', $corpath],
+	   ['A   A',
+	    'A   A/foo',
+	    'A   A/bar',
+	    'A   A/binary',
+	    'A   A/baz',
+	    'D   bar',
+	    'D   foo',
+	    'D   nor']);
+
 is_sorted_output ($svk, 'diff', ['-sr1:2'],
 	   ['M   A/foo',
 	    'M   A/bar',
=== t/27mkdir.t
==================================================================
--- t/27mkdir.t   (/svk/trunk)   (revision 11244)
+++ t/27mkdir.t   (/svk/improved-tests)   (local)
@@ -31,7 +31,7 @@
 	   ['Committed revision 3.']);
 
 is_output ($svk, 'mkdir', ["$copath/c-newfile"],
-      ["A   $copath/c-newfile"]);
+      [__"A   $copath/c-newfile"]);
 
 is_output ($svk, 'mkdir', ["$copath/c-newdir/deeper"],
       ["$copath/c-newdir/deeper is not a depot path."]);
=== t/36push-pull.t
==================================================================
--- t/36push-pull.t   (/svk/trunk)   (revision 11244)
+++ t/36push-pull.t   (/svk/improved-tests)   (local)
@@ -5,7 +5,7 @@
 use File::Path;
 
 BEGIN { require 't/tree.pl' };
-plan_svm tests => 8;
+plan_svm tests => 12;
 
 my $initial_cwd = getcwd;
 
@@ -16,6 +16,7 @@
 
 my ($copath_test, $corpath_test) = get_copath ('push-pull-test');
 my ($copath_default, $corpath_default) = get_copath ('push-pull-default');
+my ($copath_second, $corpath_second) = get_copath ('push-pull-second');
 
 my ($test_repospath, $test_a_path, $test_repos) =$xd->find_repos ('/test/A', 1);
 my $test_uuid = $test_repos->fs->get_uuid;
@@ -41,9 +42,12 @@
 
 $svk->commit ('-m', 'local modification from branch', "$corpath_default");
 
+append_file ("$corpath_default/T/xd", "more content\n");
+$svk->commit ('-m', 'second local modification from branch', "$corpath_default");
+
 chdir ($corpath_default);
 is_output ($svk, "push", [], [
-        "Auto-merging (0, 5) /l to /m (base /m:3).",
+        "Auto-merging (0, 6) /l to /m (base /m:3).",
         "===> Auto-merging (0, 4) /l to /m (base /m:3).",
         "Merging back to mirror source $uri/A.",
         "Empty merge.",
@@ -57,8 +61,34 @@
         "Merge back committed as revision 3.",
         "Syncing $uri/A",
         "Retrieving log information from 3 to 3",
-        "Committed revision 6 from revision 3."]);
+        "Committed revision 7 from revision 3.",
+        "===> Auto-merging (5, 6) /l to /m (base /l:5).",
+        "Merging back to mirror source $uri/A.",
+        "U   T/xd",
+        "New merge ticket: $default_uuid:/l:6",
+        "Merge back committed as revision 4.",
+        "Syncing $uri/A",
+        "Retrieving log information from 4 to 4",
+        "Committed revision 8 from revision 4."]);
 
+append_file ("$corpath_default/T/xd", "even more content\n");
+$svk->commit ('-m', 'third local modification from branch', "$corpath_default");
+
+append_file ("$corpath_default/be", "more content\n");
+$svk->commit ('-m', 'fourth local modification from branch', "$corpath_default");
+
+is_output ($svk, 'push', ['-l'], [
+        "Auto-merging (6, 10) /l to /m (base /l:6).",
+        "Merging back to mirror source $uri/A.",
+        "U   T/xd",
+        "U   be",
+        "New merge ticket: $default_uuid:/l:10",
+        "Merge back committed as revision 5.",
+        "Syncing $uri/A",
+        "Retrieving log information from 5 to 5",
+        "Committed revision 11 from revision 5."]);
+
+
 $svk->checkout ('/test/A', $corpath_test);
 
 # add a file to remote
@@ -70,13 +100,13 @@
 chdir ($corpath_default);
 is_output ($svk, "pull", [], [
         "Syncing $uri/A",
-        "Retrieving log information from 4 to 4",
-        "Committed revision 7 from revision 4.",
-        "Auto-merging (3, 7) /m to /l (base /l:5).",
+        "Retrieving log information from 6 to 6",
+        "Committed revision 12 from revision 6.",
+        "Auto-merging (3, 12) /m to /l (base /l:10).",
         "A   new-file",
-        "New merge ticket: $test_uuid:/A:4",
-        "Committed revision 8.",
-        "Syncing //l(/l) in $corpath_default to 8.",
+        "New merge ticket: $test_uuid:/A:6",
+        "Committed revision 13.",
+        "Syncing //l(/l) in $corpath_default to 13.",
         "A   new-file"]);
 
 
@@ -90,32 +120,52 @@
 
 $svk->sync ("//m");
 
+is_output ($svk, "push", ['-C', "--from", "//m", "//l"], [
+        "Auto-merging (12, 14) /m to /l (base /m:12).",
+        "Incremental merge not guaranteed even if check is successful",
+        "U   new-file",
+        "New merge ticket: $test_uuid:/A:7"]);
+
 is_output ($svk, "push", ["--from", "//m", "//l"], [
-        "Auto-merging (7, 9) /m to /l (base /m:7).",
-        "===> Auto-merging (7, 9) /m to /l (base /m:7).",
+        "Auto-merging (12, 14) /m to /l (base /m:12).",
+        "===> Auto-merging (12, 14) /m to /l (base /m:12).",
         "U   new-file",
-        "New merge ticket: $test_uuid:/A:5",
-        "Committed revision 10."]);
+        "New merge ticket: $test_uuid:/A:7",
+        "Committed revision 15."]);
 
 $svk->switch ("//m", $corpath_default);
 append_file ("$corpath_default/new-file", "some text\n");
 $svk->commit ('-m', 'modification to mirror', "$corpath_default");
 
 is_output ($svk, "pull", ["//l"], [
-        "Auto-merging (9, 11) /m to /l (base /m:9).",
-        "===> Auto-merging (9, 11) /m to /l (base /m:9).",
+        "Auto-merging (14, 16) /m to /l (base /m:14).",
+        "===> Auto-merging (14, 16) /m to /l (base /m:14).",
         "U   new-file",
-        "New merge ticket: $test_uuid:/A:6",
-        "Committed revision 12."]);
+        "New merge ticket: $test_uuid:/A:8",
+        "Committed revision 17."]);
 
+$svk->copy ('-m', '2nd branch', '//m', '//l2');
+$svk->checkout ('//l2', $corpath_second);
+
+is_output ($svk, "pull", [$corpath_default, $corpath_second], [
+        "Syncing $uri/A",
+        "Syncing //m(/m) in $corpath_default to 18.",
+        "Syncing //l2(/l2) in $corpath_second to 18."]);
+is_output ($svk, "pull", ['-a'], [
+        "Syncing $uri/A",
+        "Syncing //m(/m) in $corpath_default to 18.",
+        "Syncing //l2(/l2) in $corpath_second to 18.",
+        "Syncing /test/A(/A) in $corpath_test to 8.",
+        __"U   $corpath_test/new-file"]);
+
 append_file ("$corpath_default/new-file", "some text\n");
 $svk->commit ('-m', 'modification to mirror', "$corpath_default");
 
 is_output ($svk, "pull", ['--lump', "//l"], [
-        "Auto-merging (11, 13) /m to /l (base /m:11).",
+        "Auto-merging (16, 19) /m to /l (base /m:16).",
         "U   new-file",
-        "New merge ticket: $test_uuid:/A:7",
-        "Committed revision 14."]);
+        "New merge ticket: $test_uuid:/A:9",
+        "Committed revision 20."]);
 
 
 my ($copath_subir, $corpath_subdir) = get_copath ('pull-subdir-test');
@@ -130,11 +180,11 @@
 chdir ($corpath_subdir);
 is_output ($svk, "pull", ["sub"], [
 	"Syncing $uri".($test_a_path eq '/' ? '' : $test_a_path),
-	"Auto-merging (6, 17) /m/T to /l-sub/sub (base /m/T:6).",
+	"Auto-merging (11, 23) /m/T to /l-sub/sub (base /m/T:11).",
 	__("U   xd"),
-	"New merge ticket: $test_uuid:/A/T:8",
-	"Committed revision 18.",
-	"Syncing //l-sub(/l-sub/sub) in ".__("$corpath_subdir/sub to 18."),
+	"New merge ticket: $test_uuid:/A/T:10",
+	"Committed revision 24.",
+	"Syncing //l-sub(/l-sub/sub) in ".__("$corpath_subdir/sub to 24."),
        __("U   sub/xd")]);
 chdir ($initial_cwd);
 our $output;
=== t/72sign.t
==================================================================
--- t/72sign.t   (/svk/trunk)   (revision 11244)
+++ t/72sign.t   (/svk/improved-tests)   (local)
@@ -8,7 +8,7 @@
         unless (`gpg --version` || '') =~ /GnuPG/;
     plan (skip_all => "Test does not work with BDB") if $ENV{SVNFSTYPE} eq 'bdb';
 }
-plan_svm tests => 8;
+plan_svm tests => 9;
 our $output;
 
 mkpath ["t/checkout/sign-gnupg"], 0, 0700 unless -d "t/checkout/sign-gnupg";
@@ -79,4 +79,9 @@
 is_output ($svk, 'verify', [4],
 	  ['No signature found for change 4 at //.']);
 
+$svk->propset ('--revprop', '-r3', 'svk:signature', 'bad signature', '/test/');
+is_output ($svk, 'verify', [3, '/test/'],
+	  ["Can\'t verify signature",
+       "Signature verification failed."]);
+
 1;

