mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-22 06:21:45 +03:00
add url databse write output to unit test
This commit is contained in:
parent
4448fa6cbf
commit
958fb6aa5e
@ -592,7 +592,7 @@ static nserror failing_init_cb(struct nsoption_s *defaults)
|
||||
}
|
||||
|
||||
/**
|
||||
* Test default initialisation waith failing callback
|
||||
* Test default initialisation with failing callback
|
||||
*/
|
||||
START_TEST(nsoption_api_init_failcb_test)
|
||||
{
|
||||
|
@ -373,7 +373,7 @@ END_TEST
|
||||
TCase *urldb_original_case_create(void)
|
||||
{
|
||||
TCase *tc;
|
||||
tc = tcase_create("Original urldb tests");
|
||||
tc = tcase_create("Original_tests");
|
||||
|
||||
/* ensure corestrings are initialised and finalised for every test */
|
||||
tcase_add_checked_fixture(tc,
|
||||
@ -388,18 +388,33 @@ TCase *urldb_original_case_create(void)
|
||||
START_TEST(urldb_session_test)
|
||||
{
|
||||
nserror res;
|
||||
char *outnam;
|
||||
|
||||
/* writing output requires options initialising */
|
||||
res = nsoption_init(NULL, NULL, NULL);
|
||||
ck_assert_int_eq(res, NSERROR_OK);
|
||||
|
||||
res = urldb_load(test_urldb_path);
|
||||
ck_assert_int_eq(res, NSERROR_OK);
|
||||
|
||||
/* write database out */
|
||||
outnam = tmpnam(NULL);
|
||||
res = urldb_save(outnam);
|
||||
ck_assert_int_eq(res, NSERROR_OK);
|
||||
|
||||
urldb_destroy();
|
||||
|
||||
/* finalise options */
|
||||
res = nsoption_finalise(NULL, NULL);
|
||||
ck_assert_int_eq(res, NSERROR_OK);
|
||||
|
||||
}
|
||||
END_TEST
|
||||
|
||||
TCase *urldb_session_case_create(void)
|
||||
{
|
||||
TCase *tc;
|
||||
tc = tcase_create("Full session");
|
||||
tc = tcase_create("Full_session");
|
||||
|
||||
/* ensure corestrings are initialised and finalised for every test */
|
||||
tcase_add_checked_fixture(tc,
|
||||
@ -426,7 +441,7 @@ END_TEST
|
||||
TCase *urldb_api_case_create(void)
|
||||
{
|
||||
TCase *tc;
|
||||
tc = tcase_create("API checks");
|
||||
tc = tcase_create("API_checks");
|
||||
|
||||
tcase_add_test_raise_signal(tc,
|
||||
urldb_api_add_host_assert_test,
|
||||
|
Loading…
Reference in New Issue
Block a user