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 -#include -#include -#include -#include -#include +#include 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,15 +30,6 @@ public: TS_ASSERT_EQUALS(0, emptyStream.tellg()); } - void testEmptyFileIsNotBinaryFile() - { - stringstream emptyStream(stringstream::in); - binary_parser_t binaryParser; - TS_ASSERT(!binaryParser.test(emptyStream)); - TS_ASSERT(emptyStream.good()); - TS_ASSERT_EQUALS(0, emptyStream.tellg()); - } - void testEmptyFileIsNotGnuCashFile() { stringstream emptyStream(stringstream::in); @@ -50,6 +38,16 @@ public: TS_ASSERT(emptyStream.good()); TS_ASSERT_EQUALS(0, emptyStream.tellg()); } +#endif + + void testEmptyFileIsNotBinaryFile() + { + stringstream emptyStream(stringstream::in); + binary_parser_t binaryParser; + TS_ASSERT(!binaryParser.test(emptyStream)); + TS_ASSERT(emptyStream.good()); + TS_ASSERT_EQUALS(0, emptyStream.tellg()); + } void testEmptyFileIsNotQIFFile() {