test-theme: Change presumed CWD

The executable is assumed to be run from $top_srcdir/src, which is
essentially an autotools left-over (it's where the program ended
up with srcdir == builddir).

Now with meson, its actual srcdir makes more senses.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/419
This commit is contained in:
Florian Müllner 2019-02-26 01:57:01 +01:00 committed by Georges Basile Stavracas Neto
parent 70ac33d58c
commit fde8401124

View File

@ -411,15 +411,15 @@ test_background (void)
test = "background"; test = "background";
/* group1 has a background: shortcut property setting color and image */ /* group1 has a background: shortcut property setting color and image */
assert_background_color (group1, "group1", 0xff0000ff); assert_background_color (group1, "group1", 0xff0000ff);
assert_background_image (group1, "group1", "st/some-background.png"); assert_background_image (group1, "group1", "some-background.png");
/* text1 inherits the background image but not the color */ /* text1 inherits the background image but not the color */
assert_background_color (text1, "text1", 0x00000000); assert_background_color (text1, "text1", 0x00000000);
assert_background_image (text1, "text1", "st/some-background.png"); assert_background_image (text1, "text1", "some-background.png");
/* text2 inherits both, but then background: none overrides both */ /* text2 inherits both, but then background: none overrides both */
assert_background_color (text2, "text2", 0x00000000); assert_background_color (text2, "text2", 0x00000000);
assert_background_image (text2, "text2", NULL); assert_background_image (text2, "text2", NULL);
/* background-image property */ /* background-image property */
assert_background_image (group2, "group2", "st/other-background.png"); assert_background_image (group2, "group2", "other-background.png");
} }
static void static void
@ -545,7 +545,7 @@ main (int argc, char **argv)
/* Make sure our assumptions about resolution are correct */ /* Make sure our assumptions about resolution are correct */
g_object_set (clutter_settings_get_default (), "font-dpi", -1, NULL); g_object_set (clutter_settings_get_default (), "font-dpi", -1, NULL);
file = g_file_new_for_path ("st/test-theme.css"); file = g_file_new_for_path ("test-theme.css");
theme = st_theme_new (file, NULL, NULL); theme = st_theme_new (file, NULL, NULL);
g_object_unref (file); g_object_unref (file);