ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/ActiveDoc/test/test_ActiveDoc.pm
Revision: 1.1
Committed: Fri Dec 17 08:37:23 1999 UTC (25 years, 5 months ago) by williamc
Content type: text/plain
Branch: MAIN
CVS Tags: ProtoEnd
Branch point for: HPWbranch, V0_9branch
Log Message:
not really set up yet

File Contents

# Content
1 #
2 # ActiveDoc test suite
3 #
4
5 package ActiveDoc::test::test_ActiveDoc;
6 require 5.001;
7 use ActiveDoc::ActiveDoc;
8 use ActiveDoc::UserQuery;
9 use ActiveDoc::UserInterface_basic;
10
11 @ISA = ("TestClass"); #methods both from the test class
12
13 sub init {
14 my $self=shift;
15 $self->{testfile}=$self->datadir()."/ActiveDocTest";
16 $self->{configarea}=$self->temparea()."/ActiveDoc";
17 $self->{Configuration}=
18 ActiveDoc::ActiveConfig->new($self->{configarea});
19 }
20
21 sub test {
22 my $self=shift;
23 $self->{expectedstring}="";
24
25 $self->newtest("Initiation test");
26 $self->newobject($self->{Configuration});
27 $self->newtest("url test");
28 $self->testinterface("url","file:".$self->{testfile});
29 $self->newtest("activatedoc test");
30 $self->testinterface("activatedoc","file:".$self->{testfile});
31 }
32
33 sub printout {
34 my $self=shift; # This self not necessarily that of the rest of obj!
35 my $name=shift;
36 my $string=shift;
37
38 print " ++++++++++++++++++++ Printing ++++++++++++++++++++ ";
39 print $string;
40 if ( $self->{expectedstring} ne "" ) {
41 if ( $string=~/$self->{expectedstring}/ ) {
42 TestClass->testpass("Test Passed");
43 }
44 else {
45 TestClass->testfail("Expecting $self->{expectedstring}, got $string");
46 }
47 }
48 }