[svk-commit] r3088 - trunk/t/bm
nobody at bestpractical.com
nobody at bestpractical.com
Fri Sep 12 04:41:47 EDT 2008
Author: clsung
Date: Fri Sep 12 04:41:46 2008
New Revision: 3088
Added:
trunk/t/bm/tag-from-wc.t
Modified:
trunk/t/bm/remove-via-project.t
Log:
- purify t/bm/remote-via-project.t
- add t/bm/tag-from-wc.t
- for http://task.hm/GN5C
Modified: trunk/t/bm/remove-via-project.t
==============================================================================
--- trunk/t/bm/remove-via-project.t (original)
+++ trunk/t/bm/remove-via-project.t Fri Sep 12 04:41:46 2008
@@ -9,8 +9,7 @@
$svk->mkdir('-p', -m => 'trunk in project B', '/test/projectB/trunk');
$svk->mkdir(-m => 'branches in project B', '/test/projectB/branches');
$svk->mkdir(-m => 'tags in project B', '/test/projectB/tags');
-my $tree = create_basic_tree($xd, '/test/');
-$tree = create_basic_tree($xd, '/test/projectB/trunk');
+my $tree = create_basic_tree($xd, '/test/projectB/trunk');
my $depot = $xd->find_depot('test');
my $uri = uri($depot->repospath);
@@ -20,7 +19,7 @@
$svk->mirror('//mirror/nomeans', $uri);
$svk->sync('//mirror/nomeans');
-$svk->checkout('//mirror/nomeans',$copath);
+$svk->checkout('//mirror/nomeans/projectB/trunk',$copath);
chdir($copath);
Added: trunk/t/bm/tag-from-wc.t
==============================================================================
--- (empty file)
+++ trunk/t/bm/tag-from-wc.t Fri Sep 12 04:41:46 2008
@@ -0,0 +1,44 @@
+#!/usr/bin/perl -w
+use strict;
+use SVK::Test;
+plan tests => 4;
+our $output;
+
+my ($xd, $svk) = build_test('test');
+
+$svk->mkdir('-p', -m => 'trunk in project B', '/test/projectB/trunk');
+$svk->mkdir(-m => 'branches in project B', '/test/projectB/branches');
+$svk->mkdir(-m => 'tags in project B', '/test/projectB/tags');
+my $tree = create_basic_tree($xd, '/test/projectB/trunk');
+
+my $depot = $xd->find_depot('test');
+my $uri = uri($depot->repospath);
+
+my ($copath, $corpath) = get_copath('tag-from-wc');
+
+$svk->mirror('//mirror/nomeans', $uri);
+$svk->sync('//mirror/nomeans');
+
+$svk->checkout('//mirror/nomeans/projectB/trunk',$copath);
+
+chdir($copath);
+
+$answer = ['','','',''];
+is_output_like ($svk, 'branch', ['--setup', '//mirror/nomeans/projectB'],
+ qr/Project detected in specified path./);
+
+$svk->br('--create','Foo','--switch-to', '--project','projectB');
+is_output_like ($svk, 'branch', [],
+ qr/Branch: Foo .online./);
+
+# for http://task.hm/GN5C
+$svk->br('--create','Bar','--tag','--from','Foo');
+is_output ($svk, 'branch', ['--list', '--tag'],
+ ['Bar']);
+
+TODO: {
+local $TODO = 'incorrect from locating';
+$svk->br('--create','Bar2','--tag','--from','.');
+is_output ($svk, 'branch', ['--list', '--tag'],
+ ['Bar','Bar2']);
+}
More information about the svk-commit
mailing list