QueryParser unit test
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Sat, 8 Sep 2012 02:44:50 +0000 (22:44 -0400)
committerThomas Berezansky <tsbere@mvlc.org>
Wed, 10 Oct 2012 21:33:35 +0000 (17:33 -0400)
commit4ac047996eab51783ed2cb4a578e7ed249863e1d
treeb30c7cdf5d14b158a79d6b301fee0bc96a41430f
parent62ec607e5f9953c5fe990c7bfcc6d2f64723c424
QueryParser unit test

Test that QueryParser can handle a variety of queries. This initial
unit test does the following:

1) Test the configuration of QueryParser.
2) Test that various queries have stable canonical representations.
3) Test that a number of equivalent queries are correctly parsed as
   equivalent.
4) Test that a number of non-equivalent queries are correctly parsed as
   NOT being equivalent.
5) Several other tests relating to query parsing.

This includes almost 100% subroutine coverage in the QueryParser class.
Other classes have somewhat lower test coverage.

As of 2012-09-09, several outstanding bugs affect these tests:
1) QueryParser->superpage cannot be unset.
2) Explicit groups are not handled correctly by the abstract query
   to string converter.
3) There is no defined precedence between explicit boolean connectors
   and implicit boolean connectors.
4) Modifiers are silently dropped when not at the top level of the query.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Open-ILS/src/perlmods/t/21-QueryParser.t [new file with mode: 0644]