From 70661c68076f7aedf8f5814b7c2275ccb685c3c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Sat, 5 Nov 2016 17:34:05 +0100 Subject: [PATCH] Add checking with ASCII DAFSA in test-is-public-all.c --- tests/test-is-public-all.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/test-is-public-all.c b/tests/test-is-public-all.c index f76cfb8..aca1458 100644 --- a/tests/test-is-public-all.c +++ b/tests/test-is-public-all.c @@ -131,7 +131,7 @@ static void test_psl_entry(const psl_ctx_t *psl, const char *domain, int type) static void test_psl(void) { FILE *fp; - psl_ctx_t *psl, *psl3; + psl_ctx_t *psl, *psl3, *psl4; const psl_ctx_t *psl2; int type = 0; char buf[256], *linep, *p; @@ -147,6 +147,11 @@ static void test_psl(void) failed++; } + if (!(psl4 = psl_load_file("psl_ascii.dafsa"))) { + fprintf(stderr, "Failed to load 'psl_ascii.dafsa'\n"); + failed++; + } + if ((fp = fopen(PSL_FILE, "r"))) { #ifdef HAVE_CLOCK_GETTIME clock_gettime(CLOCK_REALTIME, &ts1); @@ -182,6 +187,9 @@ static void test_psl(void) if (psl3) test_psl_entry(psl3, p, type); + + if (psl4) + test_psl_entry(psl4, p, type); } #ifdef HAVE_CLOCK_GETTIME @@ -193,9 +201,10 @@ static void test_psl(void) failed++; } - psl_free(psl); - psl_free((psl_ctx_t *)psl2); + psl_free(psl4); psl_free(psl3); + psl_free((psl_ctx_t *)psl2); + psl_free(psl); } int main(int argc, const char * const *argv)