From aff5cef20ec28225d9d8cf90a7aef4357fc98996 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Thu, 6 Dec 2018 09:11:31 -0500 Subject: [PATCH] tests: Do not hardcode psl.dafsa and psl_ascii.dafsa file names --- tests/Makefile.am | 7 ++++++- tests/test-is-public-all.c | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 65cbb96..acb3d6d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,4 +1,9 @@ -DEFS = @DEFS@ -DSRCDIR=\"$(srcdir)\" -DPSL_FILE=\"$(PSL_FILE)\" -DPSL_TESTFILE=\"$(PSL_TESTFILE)\" +DEFS = @DEFS@ \ + -DSRCDIR=\"$(srcdir)\" \ + -DPSL_FILE=\"$(PSL_FILE)\" \ + -DPSL_TESTFILE=\"$(PSL_TESTFILE)\" \ + -DPSL_DAFSA=\"psl.dafsa\" \ + -DPSL_ASCII_DAFSA=\"psl_ascii.dafsa\" AM_CPPFLAGS = -I$(top_srcdir)/include LDADD = ../src/libpsl.la AM_LDFLAGS = -no-install diff --git a/tests/test-is-public-all.c b/tests/test-is-public-all.c index a1ec289..c12bfed 100644 --- a/tests/test-is-public-all.c +++ b/tests/test-is-public-all.c @@ -146,12 +146,12 @@ static void test_psl(void) psl2 = psl_builtin(); printf("builtin PSL has %d suffixes and %d exceptions\n", psl_suffix_count(psl2), psl_suffix_exception_count(psl2)); - if (!(psl3 = psl_load_file("psl.dafsa"))) { + if (!(psl3 = psl_load_file(PSL_DAFSA))) { fprintf(stderr, "Failed to load 'psl.dafsa'\n"); failed++; } - if (!(psl4 = psl_load_file("psl_ascii.dafsa"))) { + if (!(psl4 = psl_load_file(PSL_ASCII_DAFSA))) { fprintf(stderr, "Failed to load 'psl_ascii.dafsa'\n"); failed++; }