[Bps-public-commit] r12235 -
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Mon May 12 06:40:48 EDT 2008
Author: sunnavy
Date: Mon May 12 06:40:48 2008
New Revision: 12235
Added:
Shipwright/trunk/t/01.repo_check.t
Modified:
/ (props changed)
Log:
r12240 at sunnavys-mb: sunnavy | 2008-05-12 14:26:52 +0800
repo check test for svk
Added: Shipwright/trunk/t/01.repo_check.t
==============================================================================
--- (empty file)
+++ Shipwright/trunk/t/01.repo_check.t Mon May 12 06:40:48 2008
@@ -0,0 +1,44 @@
+use strict;
+use warnings;
+
+use Shipwright;
+use Shipwright::Test qw/has_svk create_svk_repo has_svn create_svn_repo/;
+use File::Spec::Functions qw/catfile/;
+use File::Temp qw/tempdir/;
+
+use Test::More tests => 4;
+
+my $shipwright = Shipwright->new( log_level => 'fatal', repository => '//foo' );
+
+SKIP: {
+ skip "no svk found", 4
+ unless has_svk();
+
+ create_svk_repo();
+
+ # repo check for action 'create'
+
+ my %map = (
+ create => {
+ '//__shipwright/foo' => 1,
+ 'svk:/noexists/' => 0,
+ },
+ list => {
+ '//__shipwright/foo' => 0,
+ 'svk:/noexists/' => 0,
+ },
+ );
+
+ for my $action ( keys %map ) {
+ for my $repo ( keys %{ $map{$action} } ) {
+ my $backend = Shipwright::Backend->new( repository => $repo );
+ is(
+ $backend->check_repository( action => $action ),
+ $map{$action}{$repo},
+ "$repo for action $action",
+ );
+ }
+ }
+
+}
+
More information about the Bps-public-commit
mailing list