Add psl_latest() and psl_dist_filename() to tests
This commit is contained in:
parent
a3f6134a5e
commit
31684dc7fd
|
@ -131,7 +131,7 @@ static void test_psl_entry(const psl_ctx_t *psl, const char *domain, int type)
|
||||||
static void test_psl(void)
|
static void test_psl(void)
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
psl_ctx_t *psl, *psl3, *psl4;
|
psl_ctx_t *psl, *psl3, *psl4, *psl5;
|
||||||
const psl_ctx_t *psl2;
|
const psl_ctx_t *psl2;
|
||||||
int type = 0;
|
int type = 0;
|
||||||
char buf[256], *linep, *p;
|
char buf[256], *linep, *p;
|
||||||
|
@ -152,6 +152,8 @@ static void test_psl(void)
|
||||||
failed++;
|
failed++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
psl5 = psl_latest("psl.dafsa");
|
||||||
|
|
||||||
if ((fp = fopen(PSL_FILE, "r"))) {
|
if ((fp = fopen(PSL_FILE, "r"))) {
|
||||||
#ifdef HAVE_CLOCK_GETTIME
|
#ifdef HAVE_CLOCK_GETTIME
|
||||||
clock_gettime(CLOCK_REALTIME, &ts1);
|
clock_gettime(CLOCK_REALTIME, &ts1);
|
||||||
|
@ -190,6 +192,9 @@ static void test_psl(void)
|
||||||
|
|
||||||
if (psl4)
|
if (psl4)
|
||||||
test_psl_entry(psl4, p, type);
|
test_psl_entry(psl4, p, type);
|
||||||
|
|
||||||
|
if (psl5)
|
||||||
|
test_psl_entry(psl5, p, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_CLOCK_GETTIME
|
#ifdef HAVE_CLOCK_GETTIME
|
||||||
|
@ -201,6 +206,7 @@ static void test_psl(void)
|
||||||
failed++;
|
failed++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
psl_free(psl5);
|
||||||
psl_free(psl4);
|
psl_free(psl4);
|
||||||
psl_free(psl3);
|
psl_free(psl3);
|
||||||
psl_free((psl_ctx_t *)psl2);
|
psl_free((psl_ctx_t *)psl2);
|
||||||
|
|
|
@ -146,6 +146,7 @@ static void test_psl(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
psl_get_version();
|
psl_get_version();
|
||||||
|
psl_dist_filename();
|
||||||
psl_builtin_filename();
|
psl_builtin_filename();
|
||||||
psl_builtin_outdated();
|
psl_builtin_outdated();
|
||||||
psl_builtin_file_time();
|
psl_builtin_file_time();
|
||||||
|
|
Loading…
Reference in New Issue