Add xmlpp.pl from http://software.decisionsoft.com/tools.html
[cql-java-moved-to-github.git] / test / regression / README
1 $Id: README,v 1.2 2002-11-19 12:11:48 mike Exp $
2
3 "queries.raw" is the file of test queries as provided by Rob.
4 "mktests" parses the raw file into sections and individual queries
5 "sections" is the top-level directory created by that program.
6   "01", "02" etc. represent the sections within the raw file
7     "01/name", "02/name", etc. contain the names of the sections.
8     "01/01.cql", "01/02.cql" etc. are the CQL queries themselves.
9 "mkanswers" uses a trusted CQL compiler to generate corresponding XCQL.
10     "01/01.xcql", "01/02.xcql" etc. are the compiled XCQL queries.
11 "runtests" compares the output of a CQL compiler with existing XCQL files.
12
13 "Makefile" controls the building of all this.  You'll need to edit it
14 if you want to use different compilers and suchlike from what's
15 written into it, so it may be easier to run the tests by hand -- but
16 it's a useful reference for the kinds of commands you might need,
17 anyway.
18
19 So, for example, if you think Rob Sanderson's parser, CQLParser.py, is
20 reliable, and you want to test my parser, cql-java's CQLParser class,
21 against its results, do this:
22
23         rm -rf sections
24         ./mktests queries.raw
25         ./mkanswers CQLParser.py
26         ./runtests CQLParser sgmlnorm
27
28 (Except that sgmlnorm is useless -- gotta find something better.)
29 (That something better is xmlpp from DecisionSoft, found at
30         http://software.decisionsoft.com/tools.html
31 which I will probably distribute along with cql-java.)
32
33 Also: there's a nasty hack here called "showtest" which, when run like
34 ``./showtest 07/03'', will show you the ways in which my output
35 differs from Adam's.  I'll probably delete it soon.