Add psl_latest() and psl_dist_filename() to tests

This commit is contained in:
Tim Rühsen 2017-01-04 17:10:57 +01:00
parent a3f6134a5e
commit 31684dc7fd
2 changed files with 8 additions and 1 deletions

View File

@ -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, *psl4;
psl_ctx_t *psl, *psl3, *psl4, *psl5;
const psl_ctx_t *psl2;
int type = 0;
char buf[256], *linep, *p;
@ -152,6 +152,8 @@ static void test_psl(void)
failed++;
}
psl5 = psl_latest("psl.dafsa");
if ((fp = fopen(PSL_FILE, "r"))) {
#ifdef HAVE_CLOCK_GETTIME
clock_gettime(CLOCK_REALTIME, &ts1);
@ -190,6 +192,9 @@ static void test_psl(void)
if (psl4)
test_psl_entry(psl4, p, type);
if (psl5)
test_psl_entry(psl5, p, type);
}
#ifdef HAVE_CLOCK_GETTIME
@ -201,6 +206,7 @@ static void test_psl(void)
failed++;
}
psl_free(psl5);
psl_free(psl4);
psl_free(psl3);
psl_free((psl_ctx_t *)psl2);

View File

@ -146,6 +146,7 @@ static void test_psl(void)
}
psl_get_version();
psl_dist_filename();
psl_builtin_filename();
psl_builtin_outdated();
psl_builtin_file_time();