2012-01-28 19:54:10 +01:00
|
|
|
/* See LICENSE file for license and copyright information */
|
|
|
|
|
|
|
|
#include <check.h>
|
|
|
|
|
2014-11-07 15:57:46 +01:00
|
|
|
#include "utils.h"
|
2012-01-28 19:54:10 +01:00
|
|
|
|
2012-03-15 16:38:20 +01:00
|
|
|
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
|
|
|
|
|
2012-01-28 19:54:10 +01:00
|
|
|
Suite* suite_utils()
|
|
|
|
{
|
|
|
|
TCase* tcase = NULL;
|
|
|
|
Suite* suite = suite_create("Utils");
|
|
|
|
|
2012-03-15 16:38:20 +01:00
|
|
|
/* file valid extension */
|
|
|
|
tcase = tcase_create("file_valid_extension");
|
|
|
|
tcase_add_test(tcase, test_file_valid_extension_null);
|
|
|
|
suite_add_tcase(suite, tcase);
|
|
|
|
|
2012-01-28 19:54:10 +01:00
|
|
|
return suite;
|
|
|
|
}
|