33 lines
667 B
C
33 lines
667 B
C
#define _DEFAULT_SOURCE
|
|
#include <stdarg.h>
|
|
#include <setjmp.h>
|
|
#include <stddef.h>
|
|
#include <cmocka.h>
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
#include <edapi/journal/journal.h>
|
|
|
|
static void test_userprofile_location(void **state)
|
|
{
|
|
setenv("USERPROFILE", "./", 1);
|
|
|
|
EDJournal *journal = ed_journal_new();
|
|
assert_non_null(journal);
|
|
|
|
gchar const *location = ed_journal_get_location(journal);
|
|
assert_non_null(location);
|
|
|
|
g_clear_object(&journal);
|
|
}
|
|
|
|
int main(int ac, char **av)
|
|
{
|
|
static const struct CMUnitTest tests[] = {
|
|
cmocka_unit_test(test_userprofile_location),
|
|
};
|
|
|
|
return cmocka_run_group_tests(tests, NULL, NULL);
|
|
}
|