diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2022-01-13 13:44:42 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2022-01-15 00:38:14 +0530 |
commit | ca0c75777042398a0f52f59054dbaf99c8eeb745 (patch) | |
tree | e27204a901f6fb2c8188c08d684b47d5da09d5a4 /test cases/frameworks | |
parent | 23bc0e642265dfda8328635422e0ab3ac2e90dde (diff) | |
download | meson-ca0c75777042398a0f52f59054dbaf99c8eeb745.zip meson-ca0c75777042398a0f52f59054dbaf99c8eeb745.tar.gz meson-ca0c75777042398a0f52f59054dbaf99c8eeb745.tar.bz2 |
tests: Add regression tests for gdbus_codegen args
https://github.com/mesonbuild/meson/pull/9812
Diffstat (limited to 'test cases/frameworks')
-rw-r--r-- | test cases/frameworks/7 gnome/gdbus/data/com.example.Sample.xml | 4 | ||||
-rw-r--r-- | test cases/frameworks/7 gnome/gdbus/meson.build | 19 |
2 files changed, 22 insertions, 1 deletions
diff --git a/test cases/frameworks/7 gnome/gdbus/data/com.example.Sample.xml b/test cases/frameworks/7 gnome/gdbus/data/com.example.Sample.xml index 9ece885..d7adc30 100644 --- a/test cases/frameworks/7 gnome/gdbus/data/com.example.Sample.xml +++ b/test cases/frameworks/7 gnome/gdbus/data/com.example.Sample.xml @@ -6,5 +6,9 @@ <arg direction="in" type="s" name="name"/> <arg direction="out" type="s" name="greeting"/> </method> + <method name="Bye"> + <arg direction="in" type="s" name="name"/> + <arg direction="out" type="s" name="greeting"/> + </method> </interface> </node> diff --git a/test cases/frameworks/7 gnome/gdbus/meson.build b/test cases/frameworks/7 gnome/gdbus/meson.build index 2de172f..a786d24 100644 --- a/test cases/frameworks/7 gnome/gdbus/meson.build +++ b/test cases/frameworks/7 gnome/gdbus/meson.build @@ -10,12 +10,29 @@ assert(gdbus_src.length() == 2, 'expected 2 targets') assert(gdbus_src[0].full_path().endswith('.c'), 'expected 1 c source file') assert(gdbus_src[1].full_path().endswith('.h'), 'expected 1 c header file') +sample_xml = configure_file(input: 'data/com.example.Sample.xml', + output: 'com.example.Sample.xml', + copy: true) + +gdbus_src = gnome.gdbus_codegen('generated-gdbus-no-docbook-files-posarg', + sample_xml, + interface_prefix : 'com.example.', + namespace : 'Sample', + annotations : [ + ['com.example.Hello()', 'org.freedesktop.DBus.Deprecated', 'true'] + ], +) +assert(gdbus_src.length() == 2, 'expected 2 targets') +assert(gdbus_src[0].full_path().endswith('.c'), 'expected 1 c source file') +assert(gdbus_src[1].full_path().endswith('.h'), 'expected 1 c header file') + gdbus_src = gnome.gdbus_codegen('generated-gdbus', sources : files('data/com.example.Sample.xml'), interface_prefix : 'com.example.', namespace : 'Sample', annotations : [ - ['com.example.Hello()', 'org.freedesktop.DBus.Deprecated', 'true'] + ['com.example.Hello()', 'org.freedesktop.DBus.Deprecated', 'true'], + ['com.example.Bye()', 'org.freedesktop.DBus.Deprecated', 'true'], ], docbook : 'generated-gdbus-doc', install_header : true, |