Commit Graph

22 Commits

Author SHA1 Message Date
Maks Naumov
12e32e96a3 Don't skip invalid enum values in schemas
Signed-off-by: Maks Naumov <maksqwe1@ukr.net>

https://bugzilla.gnome.org/show_bug.cgi?id=742997
2017-10-11 10:22:23 +01:00
Ryan Lortie
3fa0a051a4 gsettings: add test for repeated <summary> errors
Make sure error handling on repeated <summary> and <description> is
being done properly, not resulting in glib-compile-schemas throwing a
critical.

https://bugzilla.gnome.org/show_bug.cgi?id=747542
2015-04-08 22:35:35 -04:00
Matthias Clasen
b2734d762f glib-compile-schema: Don't accept duplicate docs
This schema compiler was completely ignoring <summary> and
<description> tags. Unfortunately, there are modules out there
who merge translations for these back in, with xml:lang. And
this is giving dconf-editor a hard time. Since this is not
how translations of schemas are meant to be done, just
reject such schema files.

Also add tests exercising the new error handling.

https://bugzilla.gnome.org/show_bug.cgi?id=747209
2015-04-01 18:55:54 -04:00
Matthias Clasen
fc0b8d4f28 Add a test for CDATA in gschema.xml files 2011-11-07 00:14:28 -05:00
Ryan Lortie
d95b750a1d compile schemas test: open ranges for all types
We need to make sure that every value in the table actually parses with
GVariant.
2011-03-31 15:15:09 +05:30
Ryan Lortie
d2af82e820 gschema-test: invert expectation for min/max omit
It is now completely valid.

Fix up what is now a legitimate range error in the schema used in one of
the tests.
2011-03-31 15:15:09 +05:30
Christian Persch
b4632e1c98 Fix the wrong-category schema test
It's supposed to test a <default l10n="..."> with a non-existent
category, so make it actually check this!

Bug #635882.
2010-11-28 17:26:30 -05:00
Christian Persch
57143e311d Inherit gettext-domain from <schemalist>
When the <schema> doesn't have a 'gettext-domain' attribute, but
the <schemalist> does, use that one.

Bug #635640.
2010-11-28 19:01:21 +01:00
Ryan Lortie
5383c7110f Bug 622124 - implement flags for GSettings
Add a <flags> tag to the schema file format and a flags='' attribute to
go along with.  Add some extra test cases for those.

Add new g_settings_{get,set}_flags() calls and support binding to
GParamSpecFlags properties.  Add test cases.
2010-07-01 19:06:02 -04:00
Ryan Lortie
3628b0b499 GSettings: add <override>, tests, modify output
Add <override> tag, more tests, and actually output the results of these
new tags to the gschemas.compiled file.
2010-06-29 20:24:39 -04:00
Ryan Lortie
900a756e8f GSettings: new <schema> tags 'extends', 'list-of'
Add support for extends='' and list-of='' tags to the <schema> element.
The attributes are parsed and some sanity-checking is done but currently
nothing happens as a result.

Add some tests.
2010-06-29 15:58:35 -04:00
Ryan Lortie
a768953760 Fix bug in strinfo
We can't search for a larger needle inside of a smaller haystack, and
unsigned integer subtraction tends to result in very large numbers
rather than small ones.

Add a check for this case and abort out immediately.

Also add a test case (lifted directly from the docs) that demonstrates
the problem.

Issue discovered and tracked down by Milan Bouchet-Valat
2010-06-19 11:41:30 -04:00
Ryan Lortie
fc538894d3 GSettings: enum/choices/aliases/range test cases
Fix a small bug that one of the tests uncovered.
2010-06-17 00:03:44 -04:00
Ryan Lortie
71c5e3f899 Bug 620496 - schema compiler: reject invalid paths
The GSettings schema compiler was accepting any string as a path.  It is
probably quite a common mistake to suspect that '/apps/foo' is a valid
path name when this will cause all sorts of trouble later.  Check for
this case and report the error.
2010-06-07 10:18:43 +02:00
Christian Persch
6f7fb3744b Add testcases for <range> and <choices>
Bug #616102.
2010-04-25 20:07:26 -05:00
Matthias Clasen
1c2aea7854 Add tests for --allow-any-name 2010-04-21 09:50:42 -04:00
Matthias Clasen
9708431788 Remove leftover test data 2010-04-21 09:34:57 -04:00
Matthias Clasen
c83a976245 Add some more schema compiler tests 2010-04-21 00:43:55 -04:00
Matthias Clasen
afff087785 Simplify gschema-compile test suite
Add --one-schema-file option to gschema-compile to allow easier test
setup. Simplify the test setup.

Bug #616276.
2010-04-20 23:28:49 -04:00
Matthias Clasen
2d38da0746 Remove misnamed files 2010-04-19 13:28:00 -04:00
Matthias Clasen
0e48b0638d Some tests for gschema-compile
Mostly making sure that we produce reasonable error messages for
typical mistakes.
2010-04-19 13:28:00 -04:00
Matthias Clasen
4a605693fc Don't segfault when <default> is missing
Also add a framework for schema compiler tests.

Fixes bug 616086.
2010-04-19 11:49:12 -04:00