#!/usr/local/bin/perl -w =head1 NAME 00rev.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->labels( "l4", "l5" ) ; ok( join( ",", $r->labels ), "l4,l5" ) ; }, ) ; plan tests => scalar( @tests ) ; $_->() for @tests ;
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 1375 | Sean McCune | Creating my own branch for work on vcp. | ||
//guest/perforce_software/revml/t/00rev.t | |||||
#1 | 468 | Barrie Slaymaker |
- VCP::Dest::p4 now does change number aggregation based on the comment field changing or whenever a new revision of a file with unsubmitted changes shows up on the input stream. Since revisions of files are normally sorted in time order, this should work in a number of cases. I'm sure we'll need to generalize it, perhaps with a time thresholding function. - t/90cvs.t now tests cvs->p4 replication. - VCP::Dest::p4 now doesn't try to `p4 submit` when no changes are pending. - VCP::Rev now prevents the same label from being applied twice to a revision. This was occuring because the "r_1"-style label that gets added to a target revision by VCP::Dest::p4 could duplicate a label "r_1" that happened to already be on a revision. - Added t/00rev.t, the beginnings of a test suite for VCP::Rev. - Tweaked bin/gentrevml to comment revisions with their change number instead of using a unique comment for every revision for non-p4 t/test-*-in-0.revml files. This was necessary to test cvs->p4 functionality. |