00split_id.t #3

  • //
  • guest/
  • perforce_software/
  • revml/
  • t/
  • 00split_id.t
  • View
  • Commits
  • Open Download .zip Download (903 B)
#!/usr/local/bin/perl -w

=head1 NAME

00split_id.t - testing of VCP::Rev services

=cut

use strict ;

use Carp ;
use Test ;
use VCP::Rev ;

## TODO: Add lots of tests to 00rev.t

my $r ;

my @tests = (
sub { $r = VCP::Rev->new() ; ok( ref $r, "VCP::Rev" ) },

sub { ok( ! $r->labels, ! 0 ) },

sub {
   $r->add_label( "l1" ) ;
   ok( join( ",", $r->labels ), "l1" ) ;
},

sub {
   $r->add_label( "l2", "l3" ) ;
   ok( join( ",", $r->labels ), "l1,l2,l3" ) ;
},

sub {
   $r->add_label( "l2", "l3" ) ;
   ok( join( ",", $r->labels ), "l1,l2,l3" ) ;
},

sub {
   $r->set_labels( [ "l4", "l5" ] ) ;
   ok( join( ",", $r->labels ), "l4,l5" ) ;
},

sub {
   $r->name( "foo" );
   $r->source_rev_id( "1" );
   ok $r->id, "foo#1";
},

sub {
   my $comment = "hi, ho the gang's all here";
   $r->comment( $comment );
   ok $r->comment, $comment;
},

) ;

plan tests => scalar( @tests ) ;

$_->() for @tests ;
# Change User Description Committed
#5 4512 Barrie Slaymaker - t/00split_id.t was misbegotten, removed it
#4 3970 Barrie Slaymaker - VCP::Source handles rev queing, uses disk to reduce RAM
- Lots of other fixes
#3 3112 Barrie Slaymaker Reduce memory footprint when handling large numbers
       of revisions.
#2 3064 Barrie Slaymaker Fix more tests
#1 2455 Barrie Slaymaker Add wayward test script