Skip to content

Commit

Permalink
Add psl_latest() and psl_dist_filename() to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rockdaboot committed Jan 4, 2017
1 parent a3f6134 commit 31684dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/test-is-public-all.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down Expand Up @@ -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
Expand All @@ -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);
Expand Down
1 change: 1 addition & 0 deletions tests/test-is-public.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 31684dc

Please sign in to comment.