ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/ActiveDoc/test/test_Parse.pm
Revision: 1.3
Committed: Wed Aug 17 11:03:28 2005 UTC (19 years, 9 months ago) by sashby
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +0 -0 lines
State: FILE REMOVED
Log Message:
Removed obsolete test packages and test data.

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