mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-16 02:35:51 +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));
|
ck_assert(zathura_init(zathura));
|
||||||
zathura_free(zathura);
|
zathura_free(zathura);
|
||||||
} END_TEST
|
} 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)
|
static Suite* suite_sandbox(void)
|
||||||
{
|
{
|
||||||
|
@ -20,7 +31,7 @@ static Suite* suite_sandbox(void)
|
||||||
|
|
||||||
/* basic */
|
/* basic */
|
||||||
tcase = tcase_create("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);
|
tcase_add_test(tcase, test_create);
|
||||||
suite_add_tcase(suite, tcase);
|
suite_add_tcase(suite, tcase);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue