More clean up, update readme
[cql-java-moved-to-github.git] / test / regression / runcanon
diff --git a/test/regression/runcanon b/test/regression/runcanon
deleted file mode 100755 (executable)
index 46d6a93..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/perl -w
-
-#
-# Tests that all sample queries can be rendered into idempotent
-# canoncial form.
-
-use IO::File;
-use strict;
-
-$ENV{CLASSPATH} .= ":../../lib/cql-java.jar";
-
-my($ntests, $ncorrect) = (0, 0);
-
-while (<sections/*>) {
-    my $sdir = $_;
-    s@sections/@@;
-    next if /^CVS$/ || /^10$/;
-    print "testing section $_ - ", read_file("$sdir/name"), "\n";
-
-    while (<$sdir/*.cql>) {
-       my $qfile = $_;
-       s@sections/([0-9]+/.*)\.cql@$1@;
-       my $query = read_file($qfile);
-       my $canonical = `CQLParser -c '$query'`;
-       chomp($canonical);
-       my $maybe = `CQLParser -c '$canonical'`;
-       chomp($maybe);
-       print "$query // $canonical ";
-       $ntests++;
-       if ($maybe eq $canonical) {
-           $ncorrect++;
-           print " OK\n";
-       } else {
-           print "### $maybe\n";
-       }
-    }
-}
-
-print sprintf("%d of %d passed: %d%%\n",
-             $ncorrect, $ntests, (100 * $ncorrect) / $ntests);
-
-sub read_file {
-    my($name) = @_;
-
-    $name = "<$name" if $name !~ /\|$/;
-    my $fh = new IO::File("$name")
-       or die "can't read '$name': $!";
-    my $contents = join('', <$fh>);
-    $fh->close();
-    return $contents;
-}