Lots of changes, mostly to documentation, towards initial release.
[cql-java-moved-to-github.git] / test / random / mkrandom
1 #!/usr/bin/perl -w
2
3 use strict;
4
5 my $n = 1;
6 if (@ARGV > 1) {
7     print STDERR "Usage: $0 [<number-of-trees>]\n";
8     exit 1;
9 } elsif (@ARGV == 1) {
10     $n = $ARGV[0];
11 }
12
13 for (my $i = 0; $i < $n; $i++) {
14     print $i+1, " of $n -- ";
15     my $query=`CQLGenerator ../../etc/generate.properties`;
16     print $query;
17     my $canon=`CQLParser -c '$query'`;
18     if ($canon ne $query) {
19         print "ERROR: canonicalised query differs from original\n";
20     }
21 }