tests: Avoid chdir() call at the start of appinfo tests

By encoding the path to the appinfo-test binary in the .desktop files,
we can avoid a chdir() call in the tests, which was a bit ugly.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://gitlab.gnome.org/GNOME/glib/issues/538
This commit is contained in:
Philip Withnall
2018-11-30 17:20:48 +00:00
parent aee897bd89
commit 46f47641c5
9 changed files with 83 additions and 47 deletions

View File

@@ -0,0 +1,19 @@
[Desktop Entry]
Type=Application
GenericName=generic-appinfo-test
Name=appinfo-test
Name[de]=appinfo-test-de
X-GNOME-FullName=example
X-GNOME-FullName[de]=Beispiel
Comment=GAppInfo example
Comment[de]=GAppInfo Beispiel
Exec=@installed_tests_dir@/appinfo-test --option %U %i --name %c --filename %k %m %%
Icon=testicon.svg
Terminal=true
StartupNotify=true
StartupWMClass=appinfo-class
MimeType=image/png;image/jpeg;
Keywords=keyword1;test keyword;
Categories=GNOME;GTK;
X-JunkFood=Burger
X-JunkFood[de]=Bratwurst