ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/BuildSystem/test/test_Requirements.pm
Revision: 1.2
Committed: Mon Aug 28 08:23:12 2000 UTC (24 years, 8 months ago) by williamc
Content type: text/plain
Branch: MAIN
CVS Tags: v102p1, V1_0_1, V1_0_0, V1_pre0, SCRAM_V1, SCRAMV1_IMPORT, V0_19_7, V0_19_6, V0_19_6p1, V0_19_5, SFATEST, V0_19_4, V0_19_4_pre3, V0_19_4_pre2, V0_19_4_pre1, V0_19_3, V0_19_2, V0_19_1, V0_19_0, V0_18_5, V0_18_4, V0_18_2, V0_18_1
Branch point for: V1_pre1, SCRAM_V1_BRANCH, V0_19_4_B
Changes since 1.1: +70 -0 lines
Log Message:
Imported from HPWbranch

File Contents

# Content
1 #
2 # Requirements.pm test suite
3 #
4
5 package BuildSystem::test::test_Requirements;
6 require 5.001;
7 use BuildSystem::Requirements;
8 use ActiveDoc::ActiveStore;
9
10 @ISA=qw(Utilities::TestClass); #methods both from the test class
11
12 sub init {
13 my $self=shift;
14 $self->{testfile}=$self->datadir()."/RequirementsDocTest";
15
16 # make a dummy toolbox
17 $self->{toolbox}=$self;
18 $self->{dbdir}=$self->temparea()."/RequirementsTest";
19 $self->{db}=ActiveDoc::ActiveStore->new($self->{dbdir});
20 }
21
22 sub test {
23 my $self=shift;
24 $self->newtest("Initiation test");
25 $self->newobject($self->{db}, "file:".$self->{testfile});
26 $self->newtest("Download test");
27 $self->testinterface("download");
28
29 $self->newtest("Selection test");
30 $self->expect("test","yetanothertool","toolb");
31 $self->testinterface("selectedtools");
32 $self->clearexpect();
33
34 $self->newtest("Tool list test");
35 $self->expect("test","anothertest","yetanothertool","toola","toolb");
36 $self->testinterface("tools");
37 $self->clearexpect();
38
39 $self->newtest("Setup Testing");
40 $self->testinterface("setup",$self);
41 $self->cmparray($self->{toolsetups},"test","yetanothertool","toolb");
42
43 $self->newtest("URL Test");
44 $self->expect("cvs://cmscvs.cern.ch/cvs_server/repositories/SCRAM?auth=pserver&module=test/testtool&passkey=AA_:yZZ3e&user=anonymous&version=A");
45 $self->testinterface("toolurl","test");
46 $self->clearexpect();
47
48 $self->newtest("Arch listing test");
49 $self->expect("testarchA","testarchB");
50 $self->testinterface("archlist");
51 $self->clearexpect();
52
53 $self->newtest("arch specific selections");
54 my $req=$self->testinterface("getreqforarch","testarchA");
55 $self->cmparray([$req->selectedtools()]
56 ,"test","yetanothertool","toola","toolb");
57 $req=$self->testinterface("getreqforarch","testarchB");
58 $self->cmparray([$req->selectedtools()],"test","yetanothertool");
59
60 $self->newtest("toolcomment");
61 $self->expect("Some comments\n");
62 $self->testinterface("toolcomment","test","version1");
63 $self->clearexpect();
64 }
65
66 # --- stubs
67 sub toolsetup {
68 my $self=shift;
69 push @{$self->{toolsetups}}, shift;
70 }