mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-27 11:17:52 +01:00
Add testcase for NP check
This commit is contained in:
parent
ce2113bbee
commit
31aa53017a
1 changed files with 11 additions and 0 deletions
|
@ -23,6 +23,12 @@ START_TEST(test_file_get_extension_single) {
|
|||
fail_unless(strcmp(extension, "pdf") == 0, NULL);
|
||||
} END_TEST
|
||||
|
||||
START_TEST(test_file_valid_extension_null) {
|
||||
fail_unless(file_valid_extension(NULL, NULL) == false, NULL);
|
||||
fail_unless(file_valid_extension((void*) 0xDEAD, NULL) == false, NULL);
|
||||
fail_unless(file_valid_extension(NULL, "pdf") == false, NULL);
|
||||
} END_TEST
|
||||
|
||||
Suite* suite_utils()
|
||||
{
|
||||
TCase* tcase = NULL;
|
||||
|
@ -40,5 +46,10 @@ Suite* suite_utils()
|
|||
tcase_add_test(tcase, test_file_get_extension_single);
|
||||
suite_add_tcase(suite, tcase);
|
||||
|
||||
/* file valid extension */
|
||||
tcase = tcase_create("file_valid_extension");
|
||||
tcase_add_test(tcase, test_file_valid_extension_null);
|
||||
suite_add_tcase(suite, tcase);
|
||||
|
||||
return suite;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue