ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/ActiveDoc/test/test_Parse.pm
Revision: 1.2
Committed: Fri Jan 14 15:55:41 2000 UTC (25 years, 4 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, ProtoEnd
Branch point for: V1_pre1, SCRAM_V1_BRANCH, V0_19_4_B
Changes since 1.1: +9 -0 lines
Log Message:
New interface changes

File Contents

# User Rev Content
1 williamc 1.1 #
2     # Parse test suite
3     #
4    
5     package ActiveDoc::test::test_Parse;
6     require 5.001;
7     @ISA = ("TestClass"); #methods both from the test class
8    
9     sub init {
10     my $self=shift;
11     $self->{testfile}=$self->datadir()."/ParseTest";
12     }
13    
14     sub test {
15     my $self=shift;
16    
17     # -- addtag test
18     $self->newobject("");
19     $self->testinterface(qw(addtag Test),\&Test_start,$self,"",$self,\&Test_end, $self);
20     $self->{testtag}=0;
21     $self->testinterface("parse",$self->{testfile});
22     if ( $self->{testtag}==1 ) {
23     $self->testpass("Test tag reached OK");
24     }
25     else {
26     $self->testfail("Failed to reach Test tag");
27     }
28 williamc 1.2
29     # service routines
30     $self->newtest("test includeparse funtion");
31     $testobj=ActiveDoc::Parse->new();
32     $testobj->addtag("includedtag",qw(a a1 b b1 c c1));
33     $self->testinterface("includeparse",$testobj);
34     $self->expect("test","includedtag");
35     $self->testinterface("tags");
36     $self->clearexpect();
37 williamc 1.1 }
38    
39     # ----- Tag routines
40     sub Test_start {
41     my $self=shift;
42     my $name=shift;
43     my $hashref=shift;
44    
45     print "Test start tag <".$name."> called\n";
46     $self->{testtag}=1;
47    
48     }
49     sub Test_end {
50     my $self=shift;
51     my $name=shift;
52     my $hashref=shift;
53    
54     print "Test end tag </".$name."> called\n";
55    
56     }
57