From 3fa0a051a47ca9e7ddcaf56cf842dc133fceede9 Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Wed, 8 Apr 2015 22:11:27 -0400 Subject: [PATCH] gsettings: add test for repeated errors Make sure error handling on repeated and is being done properly, not resulting in glib-compile-schemas throwing a critical. https://bugzilla.gnome.org/show_bug.cgi?id=747542 --- gio/tests/gschema-compile.c | 3 +++ .../summary-xmllang-and-attrs.gschema.xml | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 gio/tests/schema-tests/summary-xmllang-and-attrs.gschema.xml diff --git a/gio/tests/gschema-compile.c b/gio/tests/gschema-compile.c index 1f2b74654..a215a846a 100644 --- a/gio/tests/gschema-compile.c +++ b/gio/tests/gschema-compile.c @@ -44,6 +44,8 @@ test_schema (gpointer data) if (test->err) { g_test_trap_assert_failed (); + g_test_trap_assert_stderr_unmatched ("*CRITICAL*"); + g_test_trap_assert_stderr_unmatched ("*WARNING*"); g_test_trap_assert_stderr (test->err); } else @@ -128,6 +130,7 @@ static const SchemaTest tests[] = { { "flags-with-enum-tag", NULL, "* not (yet) defined*" }, { "summary-xmllang", NULL, "*Only one element allowed*" }, { "description-xmllang", NULL, "*Only one element allowed*" }, + { "summary-xmllang-and-attrs", NULL, "*attribute 'lang' invalid for element 'summary'*" }, { "inherit-gettext-domain", NULL, NULL }, { "range-type-test", NULL, NULL }, { "cdata", NULL, NULL } diff --git a/gio/tests/schema-tests/summary-xmllang-and-attrs.gschema.xml b/gio/tests/schema-tests/summary-xmllang-and-attrs.gschema.xml new file mode 100644 index 000000000..b1da54e42 --- /dev/null +++ b/gio/tests/schema-tests/summary-xmllang-and-attrs.gschema.xml @@ -0,0 +1,13 @@ + + + + false + Window-specific screenshot (deprecated) + Captura especifica de finestra (obsoleto) + لقطة شاشة مختصّة بنافذة (مُبطل) + উইন্ডোৰ ক্ষেত্ৰত নিৰ্দিষ্ট স্ক্ৰিনশ্বট (স্খলিত) + Captura específica de ventana (obsoleto) + Bla + + +