tests/gdbus-introspection: Add a less trivial test case for _IGNORE_QUALIFIED

This is distilled from PackageKit which currently aborts on startup.

https://bugzilla.gnome.org/show_bug.cgi?id=665634
This commit is contained in:
Colin Walters 2013-10-29 09:47:34 -04:00 committed by Ryan Lortie
parent daff84e23c
commit 5280c03368

View File

@ -259,10 +259,6 @@ test_default_direction (void)
g_dbus_node_info_unref (info); g_dbus_node_info_unref (info);
} }
#if 0
/* XXX: need to figure out how generous we want to be here */
/* test that extraneous attributes are ignored
*/
static void static void
test_extra_data (void) test_extra_data (void)
{ {
@ -270,11 +266,18 @@ test_extra_data (void)
const gchar *data = const gchar *data =
" <node>" " <node>"
" <interface name='com.example.Frob' version='1.0'>" " <interface name='com.example.Frob' version='1.0'>"
" <annotation name='foo' value='bar' extra='bla'/>" " <doc:doc><doc:description><doc:para>Blah blah</doc:para></doc:description></doc:doc>"
" <method name='PairReturn' anotherattribute='bla'>" " <method name='DownloadPackages'>"
" <annotation name='org.freedesktop.DBus.GLib.Async' value=''/>" " <arg type='u' name='somenumber' direction='in'>"
" <arg type='u' name='somenumber' direction='in' spin='left'/>" " <doc:doc><doc:summary><doc:para>"
" <arg type='s' name='somestring' direction='out'/>" " See <doc:ulink url='http:///example.com'>example</doc:ulink>"
" </doc:para></doc:summary></doc:doc>"
" </arg>"
" <arg type='s' name='somestring' direction='out'>"
" <doc:doc><doc:summary><doc:para>"
" More docs"
" </doc:para></doc:summary></doc:doc>"
" </arg>"
" </method>" " </method>"
" <signal name='HelloWorld'>" " <signal name='HelloWorld'>"
" <arg type='s' name='somestring'/>" " <arg type='s' name='somestring'/>"
@ -293,7 +296,6 @@ test_extra_data (void)
g_dbus_node_info_unref (info); g_dbus_node_info_unref (info);
} }
#endif
/* ---------------------------------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------------------------------------- */
@ -313,10 +315,7 @@ main (int argc,
g_test_add_func ("/gdbus/introspection-parser", test_introspection_parser); g_test_add_func ("/gdbus/introspection-parser", test_introspection_parser);
g_test_add_func ("/gdbus/introspection-generate", test_generate); g_test_add_func ("/gdbus/introspection-generate", test_generate);
g_test_add_func ("/gdbus/introspection-default-direction", test_default_direction); g_test_add_func ("/gdbus/introspection-default-direction", test_default_direction);
#if 0
/* XXX: need to figure out how generous we want to be here */
g_test_add_func ("/gdbus/introspection-extra-data", test_extra_data); g_test_add_func ("/gdbus/introspection-extra-data", test_extra_data);
#endif
ret = g_test_run (); ret = g_test_run ();