ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/BuildSystem/test/test_ToolBox.pm
Revision: 1.1.2.1
Committed: Wed Apr 19 14:15:02 2000 UTC (25 years ago) by williamc
Content type: text/plain
Branch: V0_9branch
CVS Tags: V0_12_2, V0_12_1, V0_12_0
Changes since 1.1: +64 -0 lines
Log Message:
New ToolBox Regime - no clientsettings anymore

File Contents

# User Rev Content
1 williamc 1.1.2.1 #
2     # ToolBox.pm test suite
3     #
4    
5     package BuildSystem::test::test_ToolBox;
6     require 5.001;
7     use BuildSystem::ToolBox;
8    
9     @ISA=qw(Utilities::TestClass); #methods both from the test class
10    
11     sub init {
12     my $self=shift;
13     $self->{testarea}=$self->temparea()."/TestArea";
14     $self->{testfile}=$self->datadir()."/ToolDocTest";
15    
16     # make a dummy area
17     $ENV{LOCALTOP}=$self->{testarea};
18     $ENV{projconfigdir}="config";
19     $ENV{SCRAM_ARCH}="TestArch";
20    
21     AddDir::adddir($self->{testarea}."/".$ENV{projconfigdir});
22     use File::Copy;
23     my $depsfile="External_Dependencies";
24     $self->{testdepsfile}=$self->datadir()."/".$depsfile;
25     copy($self->{testdepsfile},$self->{testarea}."/".$ENV{projconfigdir}."/".$depsfile)
26     or die $!."\n";
27     }
28    
29     sub test {
30     my $self=shift;
31     $self->newtest("Initiation test");
32     $self->newobject();
33     $self->testinterface("verbosity","1");
34    
35    
36     $self->newtest("Tool Setup Testing");
37     $self->testinterface("toolsetup","test","version1","Test");
38    
39     $self->newtest("Default Version Test");
40     $self->_testversions();
41    
42     $self->newtest("Tool Setup Testing - url from tool object");
43     $self->testinterface("toolsetup","test","version1");
44    
45     $self->newtest("Tool Setup Testing - url from tool object ".
46     "and default version");
47     $self->testinterface("toolsetup","test");
48    
49     $self->newtest("gettool test - undefined expected");
50     $self->expect(undef);
51     $self->testinterface("gettool","notool");
52     $self->testinterface("gettool","notool","noversion");
53     $self->clearexpect();
54     }
55    
56     sub _testversions {
57     my $self=shift;
58     $self->expect("version1");
59     $self->testinterface("defaultversion","test");
60     $self->clearexpect();
61     $self->expect("version2");
62     $self->testinterface("defaultversion","test2");
63     $self->clearexpect();
64     }