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

nobody at bestpractical.com nobody at bestpractical.com
Fri Nov 16 22:06:10 EST 2007


Author: clsung
Date: Fri Nov 16 22:06:10 2007
New Revision: 2609

Added:
   branches/bm/t/bm/prop.t

Log:
- test for project load via property

Added: branches/bm/t/bm/prop.t
==============================================================================
--- (empty file)
+++ branches/bm/t/bm/prop.t	Fri Nov 16 22:06:10 2007
@@ -0,0 +1,42 @@
+#!/usr/bin/perl -w
+use strict;
+use SVK::Test;
+plan tests => 2;
+our $output;
+
+my ($xd, $svk) = build_test('test');
+
+$svk->mkdir(-m => 'trunk', '/test/trunk');
+$svk->mkdir(-m => 'trunk', '/test/branches');
+$svk->mkdir(-m => 'trunk', '/test/tags');
+my $tree = create_basic_tree($xd, '/test/trunk');
+
+my $depot = $xd->find_depot('test');
+my $uri = uri($depot->repospath);
+
+$svk->mirror('//mirror/MyProject', $uri);
+$svk->sync('//mirror/MyProject');
+
+$svk->cp(-m => 'branch Foo', '//mirror/MyProject/trunk', '//mirror/MyProject/branches/Foo');
+
+my ($copath, $corpath) = get_copath('basic-trunk');
+
+$svk->checkout('//mirror/MyProject/trunk', $copath);
+
+chdir($copath);
+
+my $proppath = { 'trunk' => '/mirror/MyProject/trunk', 
+    'branches' => '/mirror/MyProject/branches',
+    'tags' => '/mirror/MyProject/tags',
+    'hooks' => '/mirror/MyProject/hooks',
+};
+
+$svk->propset('-m', "- project trunk path set", 'svk:project:MyProject:path_trunk',
+    $proppath->{trunk}, "//"); 
+$svk->propset('-m', "- project branches path set", 'svk:project:MyProject:path_branches',
+    $proppath->{branches}, "//");
+$svk->propset('-m', "- project tags path set", 'svk:project:MyProject:path_tags',
+    $proppath->{tags}, "//");
+is_output ($svk, 'propget', ['svk:project:MyProject:path_trunk', '//'], [$proppath->{trunk}]);
+
+is_output ($svk, 'branch', ['--list','//mirror/MyProject'], ['Foo']);


More information about the svk-commit mailing list