Imported Robodoc.
[robodoc.git] / Source / Test / cmode_test1.pl
1 #!/usr/bin/perl -w
2
3 use strict;
4 use ROBOTest;
5
6 #****x* SystemTest/cmode_test1_pl
7 # FUNCTION
8 #   Tests the option --cmode.  With this option
9 #   comments in C sourcecode should be colored.
10 #   We test this by looking for the <FONT> tag.
11 # SOURCE
12 #
13
14 ROBOTest::start("C-mode Test");
15
16 my $ok = 1;
17 while (my $line = <>) {
18     if ($line =~ /TEST_COMMENT/) {
19         my @match = ($line =~ m/FONT/ig);
20         my $cnt = scalar(@match);
21         if ($cnt != 2) {
22             $ok = 0;
23             last;
24         }
25     }
26 }
27
28 ROBOTest::assert($ok);
29 ROBOTest::finish();
30
31 0;
32
33 #*****