7 print STDERR "Usage: $0 <CQL-compiler> <XML-normaliser>\n";
10 my $compiler = $ARGV[0];
11 my $norman = $ARGV[1];
13 while (<sections/*>) {
16 print "testing section $_ - ", read_file("$sdir/name"), "\n";
18 while (<$sdir/*.cql>) {
20 s@sections/([0-9]+/.*)\.cql@$1@;
21 my $query = read_file($qfile);
23 $afile =~ s/\.cql$/.xcql/;
24 print " query $_ - $query\n";
25 my $correct = read_file("$norman < $afile |");
26 my $tested = read_file("$compiler < $qfile | $norman |")
27 or die "can't run test compiler '$compiler | $norman': $!";
28 print " *** different XCQL output\n"
29 if $tested ne $correct;
36 $name = "<$name" if $name !~ /\|$/;
37 my $fh = new IO::File("$name")
38 or die "can't read '$name': $!";
39 my $contents = join('', <$fh>);