mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-27 13:36:00 +01:00
Skip sandbox test if running under X11
This commit is contained in:
parent
c5f315d712
commit
ff53e92665
1 changed files with 12 additions and 1 deletions
|
@ -12,6 +12,17 @@ START_TEST(test_create) {
|
|||
ck_assert(zathura_init(zathura));
|
||||
zathura_free(zathura);
|
||||
} END_TEST
|
||||
static void
|
||||
sandbox_setup(void)
|
||||
{
|
||||
setup();
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
GdkDisplay* display = gdk_display_get_default();
|
||||
|
||||
ck_assert_msg(!GDK_IS_X11_DISPLAY(display), "Running under X11.");
|
||||
#endif
|
||||
}
|
||||
|
||||
static Suite* suite_sandbox(void)
|
||||
{
|
||||
|
@ -20,7 +31,7 @@ static Suite* suite_sandbox(void)
|
|||
|
||||
/* basic */
|
||||
tcase = tcase_create("basic");
|
||||
tcase_add_checked_fixture(tcase, setup, NULL);
|
||||
tcase_add_checked_fixture(tcase, sandbox_setup, NULL);
|
||||
tcase_add_test(tcase, test_create);
|
||||
suite_add_tcase(suite, tcase);
|
||||
|
||||
|
|
Loading…
Reference in a new issue