diff --git a/tests/test_sandbox.c b/tests/test_sandbox.c index 40246d8..90acdc1 100644 --- a/tests/test_sandbox.c +++ b/tests/test_sandbox.c @@ -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);