diff options
Diffstat (limited to 'test cases/wayland')
-rw-r--r-- | test cases/wayland/1 client/main.c | 9 | ||||
-rw-r--r-- | test cases/wayland/1 client/meson.build | 16 | ||||
-rw-r--r-- | test cases/wayland/2 server/main.c | 9 | ||||
-rw-r--r-- | test cases/wayland/2 server/meson.build | 16 | ||||
-rw-r--r-- | test cases/wayland/3 local/main.c | 9 | ||||
-rw-r--r-- | test cases/wayland/3 local/meson.build | 11 | ||||
-rw-r--r-- | test cases/wayland/3 local/test.xml | 6 |
7 files changed, 76 insertions, 0 deletions
diff --git a/test cases/wayland/1 client/main.c b/test cases/wayland/1 client/main.c new file mode 100644 index 0000000..6aca80d --- /dev/null +++ b/test cases/wayland/1 client/main.c @@ -0,0 +1,9 @@ +#include "xdg-shell-client-protocol.h" + +int main() { +#ifdef XDG_SHELL_CLIENT_PROTOCOL_H + return 0; +#else + return 1; +#endif +} diff --git a/test cases/wayland/1 client/meson.build b/test cases/wayland/1 client/meson.build new file mode 100644 index 0000000..7ca868b --- /dev/null +++ b/test cases/wayland/1 client/meson.build @@ -0,0 +1,16 @@ +project('wayland-test-client', 'c') + +wl_protocols_dep = dependency('wayland-protocols', required : false) +if not wl_protocols_dep.found() + error('MESON_SKIP_TEST: wayland-protocols not installed') +endif + +wl_dep = dependency('wayland-client') +wl_mod = import('unstable-wayland') + +xdg_shell_xml = wl_mod.find_protocol('xdg-shell') +xdg_shell = wl_mod.scan_xml(xdg_shell_xml) + +exe = executable('client', 'main.c', xdg_shell, dependencies : wl_dep) + +test('client', exe) diff --git a/test cases/wayland/2 server/main.c b/test cases/wayland/2 server/main.c new file mode 100644 index 0000000..3307499 --- /dev/null +++ b/test cases/wayland/2 server/main.c @@ -0,0 +1,9 @@ +#include "xdg-shell-server-protocol.h" + +int main() { +#ifdef XDG_SHELL_SERVER_PROTOCOL_H + return 0; +#else + return 1; +#endif +} diff --git a/test cases/wayland/2 server/meson.build b/test cases/wayland/2 server/meson.build new file mode 100644 index 0000000..c93ff11 --- /dev/null +++ b/test cases/wayland/2 server/meson.build @@ -0,0 +1,16 @@ +project('wayland-test-server', 'c') + +wl_protocols_dep = dependency('wayland-protocols', required : false) +if not wl_protocols_dep.found() + error('MESON_SKIP_TEST: wayland-protocols not installed') +endif + +wl_dep = dependency('wayland-server') +wl_mod = import('unstable-wayland') + +xdg_shell_xml = wl_mod.find_protocol('xdg-shell') +xdg_shell = wl_mod.scan_xml(xdg_shell_xml, side : 'server') + +exe = executable('server', 'main.c', xdg_shell, dependencies : wl_dep) + +test('client', exe) diff --git a/test cases/wayland/3 local/main.c b/test cases/wayland/3 local/main.c new file mode 100644 index 0000000..97bfa56 --- /dev/null +++ b/test cases/wayland/3 local/main.c @@ -0,0 +1,9 @@ +#include "test-client-protocol.h" + +int main() { +#ifdef TEST_CLIENT_PROTOCOL_H + return 0; +#else + return 1; +#endif +} diff --git a/test cases/wayland/3 local/meson.build b/test cases/wayland/3 local/meson.build new file mode 100644 index 0000000..7a470d6 --- /dev/null +++ b/test cases/wayland/3 local/meson.build @@ -0,0 +1,11 @@ +project('wayland-test-local', 'c') + +wl_dep = dependency('wayland-client') +wl_mod = import('unstable-wayland') + +xmls = files('test.xml') +gen = wl_mod.scan_xml(xmls) + +exe = executable('local', 'main.c', gen, dependencies : wl_dep) + +test('local', exe) diff --git a/test cases/wayland/3 local/test.xml b/test cases/wayland/3 local/test.xml new file mode 100644 index 0000000..f3c6db1 --- /dev/null +++ b/test cases/wayland/3 local/test.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<protocol name="test"> + <interface name="ext_test" version="1"> + <request name="destroy" type="destructor"/> + </interface> +</protocol> |