#!/usr/local/bin/perl -w =head1 NAME 00revs.t - testing of VCP::Revs =cut use strict ; use Carp ; use Test ; use VCP::Rev; use VCP::Revs; ## TODO: Add lots of tests to 00revs.t my $rs ; my $foo = VCP::Rev->new( name => "foo", rev_id => 0 ); my @tests = ( sub { $rs = VCP::Revs->new ; ok( ref $rs, "VCP::Revs" ) }, sub { ok 0+$rs->get, 0 }, sub { $rs->add( VCP::Rev->new( name => "foo", rev_id => 1 ) ); ok 0+$rs->get, 1; }, sub { ok $rs->get_last_added( $foo )->rev_id, 1; }, sub { eval { $rs->add( VCP::Rev->new( name => "foo", rev_id => 1 ) ) }; $@ =~ /twice/ ? ok $@, $@ : ok $@, "exception containing /twice/"; }, sub { ok $rs->get_last_added( $foo )->rev_id, 1; }, sub { $rs->add( VCP::Rev->new( name => "foo", rev_id => 2 ) ); ok 0+$rs->get, 2; }, sub { ok $rs->get_last_added( $foo )->rev_id, 2; }, ) ; plan tests => scalar( @tests ) ; $_->() for @tests ;
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#4 | 3970 | Barrie Slaymaker |
- VCP::Source handles rev queing, uses disk to reduce RAM - Lots of other fixes |
||
#3 | 3064 | Barrie Slaymaker | Fix more tests | ||
#2 | 2026 | Barrie Slaymaker | VCP::8::cvs now supoprt branching | ||
#1 | 1998 | Barrie Slaymaker | Initial, revml and core VCP support for branches |