03dest_svn.t #2

  • //
  • guest/
  • perforce_software/
  • revml/
  • t/
  • 03dest_svn.t
  • View
  • Commits
  • Open Download .zip Download (1 KB)
#!/usr/local/bin/perl -w

=head1 NAME

03dest_svn.t - testing of VCP::Dest::svn services

=cut

use strict ;

use Carp ;
use Test ;
use VCP::Dest::svn;

my $p;
my $o;

my @options = (
   "--repo-id=repo-idfoo",
   "--db-dir=db-dirfoo",

   "--create-repo",
   "--delete-repo",
);

my @tests = (
sub {
   $p = VCP::Dest::svn->new( "svn" ) ;
   ok ref $p, 'VCP::Dest::svn';
},

sub {
   $o = join( " ", map "'$_'", $p->options_as_strings );
   ok length $o;
},

(
   map {
      my $option = $_;
      $option =~ s/=.*//;
      sub {
         ok 0 <= index( $o, "'#$option" ), 1, $option;
      };
   } @options
),

sub {
   $p->parse_options( [ @options ] );
   $o = join( " ", map "'$_'", $p->options_as_strings );
   ok length $o;
},

(
   map {
      my $option = $_;
      sub {
         ok 0 <= index( $o, "'$option'" ), 1, $option;
      };
   } @options
),

sub {
   $o = $p->config_file_section_as_string;
   ok $o;
},

(
   map {
      my $option = $_;
      $option =~ s/^--?//;
      $option =~ s/=.*//;
      sub {
         ok 0 <= index( $o, $option ), 1, "$option documented";
      };
   } @options
),

) ;

plan tests => scalar( @tests ) ;

$_->() for @tests ;
# Change User Description Committed
#2 5404 Barrie Slaymaker - SVN support added
- Makefile gives clearer notices about missing optional
  prereqs.
- VCP::Filter::labelmap and VCP::Filter::map: <<skip>> replaces
  deprecated <<delete>> to be clearer that no revisions
  are deleted from either repository but some just are
  skipped and not inserted.
- VCP::Filter::map: support added for SVN-like branch labels
- VCP::Source: support added for ISO8601 timestamps
  emitted by SVN.
#1 5345 Barrie Slaymaker - Test suite branched for svn
//guest/perforce_software/revml/t/03dest_cvs.t
#4 4147 Barrie Slaymaker - t/03*.t adapted to new help and config file docs API
#3 4146 Barrie Slaymaker - Spurious \rs removed from test scripts
#2 3489 Barrie Slaymaker - Document options emitted to .vcp files.
#1 3460 Barrie Slaymaker - Revamp Plugin/Source/Dest hierarchy to allow for
  reguritating options in to .vcp files