6 ROBOTest::start("Multidoc Test");
22 sub Test_Master_Index {
23 my $mi = IO::File->new("Doc1/masterindex.html");
29 # All header types are in the source files,
30 # so they should also be listed in the master index.
32 foreach my $line (@lines) {
33 if ($line =~ m/top">([^<]+)<\/a>]/i) {
37 foreach my $file ("Modules", "Sourcefiles",
38 "Classes", "Structures", "Functions",
39 "Variables", "Procedures",
40 "Types", "Exceptions", "Definitions" ) {
41 $ok = 0 unless ( defined($seen{$file}) and $seen{$file} == 1 );
43 # Test if all source files are listed.
44 # foreach my $line (@lines) {
45 # if (($line =~ m/Source\sFiles/) ..
46 # ($line =~ m/\/table/i)) {
47 # if ($line =~ m/([a-z][a-z]file\.dat)/) {
52 # foreach my $file ( qw( ccfile.dat bbfile.dat aafile.dat) ) {
53 # $ok = 0 unless ( defined($seen{$file}) and $seen{$file} == 1 );
55 # # Test table for /****d*
56 # foreach my $line (@lines) {
57 # if (($line =~ m/Constants/) ..
58 # ($line =~ m/\/table/i)) {
59 # if ($line =~ m/_test_(\S+)_test_/) {
64 # foreach my $name ( qw( def1 def2 ) ) {
65 # $ok = 0 unless ( defined($seen{$name}) and $seen{$name} == 1 );
67 # # Test table for /****f*
68 # foreach my $line (@lines) {
69 # if (($line =~ m/Functions/) ..
70 # ($line =~ m/\/table/i)) {
71 # if ($line =~ m/_test_(\S+)_test_/) {
76 # foreach my $name ( qw( fun1 fun2 ) ) {
77 # $ok = 0 unless ( defined($seen{$name}) and $seen{$name} == 1 );
79 # # Test table for /****c*
80 # foreach my $line (@lines) {
81 # if (($line =~ m/Classes/) ..
82 # ($line =~ m/\/table/i)) {
83 # if ($line =~ m/_test_(\S+)_test_/) {
88 # foreach my $name ( qw( class1 class2 class3 ) ) {
89 # $ok = 0 unless ( defined($seen{$name}) and $seen{$name} == 1 );
95 # This tests the TOC of aafile.dat
99 my $mi = IO::File->new("Doc1/aafile_dat.html");
104 # Scan the table of content
105 foreach my $line (@lines) {
106 if (($line =~ m/TABLE\sOF\sCONTENTS/i) ..
107 ($line =~ m/\/UL/i)) {
108 if ($line =~ m/\/([ABCD][ab][ab]__level\d__)/) {
113 foreach my $name ( qw( Aaa__level1__ Bbb__level2__ Abb__level3__ Bbb__level3__ Cbb__level3__ Dbb__level3__ ) ) {
114 $ok = 0 unless ( defined($seen{$name}) and $seen{$name} == 1 );
120 ROBOTest::assertFile("Doc1/masterindex.html");
121 ROBOTest::assertDir("Doc1/Subdir");
122 ROBOTest::assertFile("Doc1/Subdir/ccfile_dat.html");
123 ROBOTest::assertFile("Doc1/aafile_dat.html");
124 ROBOTest::assertFile("Doc1/bbfile_dat.html");
125 ROBOTest::assert( Test_Master_Index(), "Master index content" );
126 ROBOTest::assert( Test_aafile_dat(), "aafile TOC" );