tests: Do not hardcode psl.dafsa and psl_ascii.dafsa file names

This commit is contained in:
Xavier Claessens 2018-12-06 09:11:31 -05:00
parent 1653897a49
commit aff5cef20e
2 changed files with 8 additions and 3 deletions

View File

@ -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

View File

@ -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++;
}