diff options
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | tests/parser.h | 20 |
2 files changed, 10 insertions, 12 deletions
diff --git a/Makefile.am b/Makefile.am index 8a50450c..1d81d92f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -158,7 +158,7 @@ alltests: alltests.cc ledger alltests.cc -L. -L.libs -lamounts -lledger runtests: alltests - ./alltests && tests/regress && tests/regtest + LD_LIBRARY_PATH=.libs ./alltests && tests/regress && tests/regtest verify: runtests python tests/runtests.py diff --git a/tests/parser.h b/tests/parser.h index 65acadb5..439d478f 100644 --- a/tests/parser.h +++ b/tests/parser.h @@ -3,11 +3,7 @@ #include <cxxtest/TestSuite.h> -#include <textual.h> -#include <xml.h> -#include <binary.h> -#include <gnucash.h> -#include <qif.h> +#include <ledger.h> using namespace std; using namespace ledger; @@ -24,6 +20,7 @@ public: TS_ASSERT_EQUALS(0, emptyStream.tellg()); } +#if defined(HAVE_EXPAT) || defined(HAVE_XMLPARSE) void testEmptyFileIsNotXMLFile() { stringstream emptyStream(stringstream::in); @@ -33,20 +30,21 @@ public: TS_ASSERT_EQUALS(0, emptyStream.tellg()); } - void testEmptyFileIsNotBinaryFile() + void testEmptyFileIsNotGnuCashFile() { stringstream emptyStream(stringstream::in); - binary_parser_t binaryParser; - TS_ASSERT(!binaryParser.test(emptyStream)); + gnucash_parser_t gnucashParser; + TS_ASSERT(!gnucashParser.test(emptyStream)); TS_ASSERT(emptyStream.good()); TS_ASSERT_EQUALS(0, emptyStream.tellg()); } +#endif - void testEmptyFileIsNotGnuCashFile() + void testEmptyFileIsNotBinaryFile() { stringstream emptyStream(stringstream::in); - gnucash_parser_t gnucashParser; - TS_ASSERT(!gnucashParser.test(emptyStream)); + binary_parser_t binaryParser; + TS_ASSERT(!binaryParser.test(emptyStream)); TS_ASSERT(emptyStream.good()); TS_ASSERT_EQUALS(0, emptyStream.tellg()); } |