mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-05-02 03:56:53 +02:00
parent
22ce6ed82d
commit
6f7fb3744b
@ -165,7 +165,21 @@ EXTRA_DIST += \
|
||||
schema-tests/bad-key2.gschema.xml \
|
||||
schema-tests/bad-key3.gschema.xml \
|
||||
schema-tests/bad-key4.gschema.xml \
|
||||
schema-tests/empty-key.gschema.xml
|
||||
schema-tests/empty-key.gschema.xml \
|
||||
schema-tests/array-default-not-in-choices.gschema.xml \
|
||||
schema-tests/bad-type.gschema.xml \
|
||||
schema-tests/choice-missing-value.gschema.xml \
|
||||
schema-tests/choices-wrong-type.gschema.xml \
|
||||
schema-tests/default-not-in-choices.gschema.xml \
|
||||
schema-tests/default-out-of-range.gschema.xml \
|
||||
schema-tests/incomplete-list.gschema.xml \
|
||||
schema-tests/missing-quotes.gschema.xml \
|
||||
schema-tests/no-default.gschema.xml \
|
||||
schema-tests/overflow.gschema.xml \
|
||||
schema-tests/range-missing-max.gschema.xml \
|
||||
schema-tests/range-missing-min.gschema.xml \
|
||||
schema-tests/range-wrong-type.gschema.xml \
|
||||
schema-tests/wrong-category.gschema.xml
|
||||
|
||||
MISC_STUFF = gschemas.compiled test.mo
|
||||
|
||||
|
@ -48,6 +48,14 @@ static const SchemaTest tests[] = {
|
||||
{ "wrong-category", NULL, "*attribute 'l10n' invalid*" },
|
||||
{ "bad-type", NULL, "*invalid GVariant type string*" },
|
||||
{ "overflow", NULL, "*out of range*" },
|
||||
{ "range-wrong-type", NULL, "*<range> not allowed for keys of type*" },
|
||||
{ "range-missing-min", NULL, "*element 'range' requires attribute 'min'*" },
|
||||
{ "range-missing-max", NULL, "*element 'range' requires attribute 'max'*" },
|
||||
{ "default-out-of-range", NULL, "*<default> is not contained in the specified range*" },
|
||||
{ "choices-wrong-type", NULL, "*<choices> not allowed for keys of type*" },
|
||||
{ "choice-missing-value", NULL, "*element 'choice' requires attribute 'value'*" },
|
||||
{ "default-not-in-choices", NULL, "*<default> contains string not in <choices>*" },
|
||||
{ "array-default-not-in-choices", NULL, "*<default> contains string not in <choices>*" },
|
||||
{ "bad-key", NULL, "*invalid name*" },
|
||||
{ "bad-key", "--allow-any-name", NULL },
|
||||
{ "bad-key2", NULL, "*invalid name*" },
|
||||
@ -57,7 +65,7 @@ static const SchemaTest tests[] = {
|
||||
{ "bad-key4", NULL, "*invalid name*" },
|
||||
{ "bad-key4", "--allow-any-name", NULL },
|
||||
{ "empty-key", NULL, "*empty names*" },
|
||||
{ "empty-key", "--allow-any-name", "*empty names*" },
|
||||
{ "empty-key", "--allow-any-name", "*empty names*" }
|
||||
};
|
||||
|
||||
int
|
||||
|
@ -0,0 +1,11 @@
|
||||
<schemalist>
|
||||
<schema id="test">
|
||||
<key name="test" type="as">
|
||||
<choices>
|
||||
<choice value="first" />
|
||||
<choice value="last" />
|
||||
</choices>
|
||||
<default>["first","last","second"]</default>
|
||||
</key>
|
||||
</schema>
|
||||
</schemalist>
|
10
gio/tests/schema-tests/choice-missing-value.gschema.xml
Normal file
10
gio/tests/schema-tests/choice-missing-value.gschema.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<schemalist>
|
||||
<schema id="test">
|
||||
<key name="test" type="s">
|
||||
<choices>
|
||||
<choice />
|
||||
</choices>
|
||||
<default>"a"</default>
|
||||
</key>
|
||||
</schema>
|
||||
</schemalist>
|
8
gio/tests/schema-tests/choices-wrong-type.gschema.xml
Normal file
8
gio/tests/schema-tests/choices-wrong-type.gschema.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<schemalist>
|
||||
<schema id="test">
|
||||
<key name="test" type="(is)">
|
||||
<choices />
|
||||
<default>(1,"a")</default>
|
||||
</key>
|
||||
</schema>
|
||||
</schemalist>
|
11
gio/tests/schema-tests/default-not-in-choices.gschema.xml
Normal file
11
gio/tests/schema-tests/default-not-in-choices.gschema.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<schemalist>
|
||||
<schema id="test">
|
||||
<key name="test" type="s">
|
||||
<choices>
|
||||
<choice value="first" />
|
||||
<choice value="last" />
|
||||
</choices>
|
||||
<default>"next-to-last"</default>
|
||||
</key>
|
||||
</schema>
|
||||
</schemalist>
|
8
gio/tests/schema-tests/default-out-of-range.gschema.xml
Normal file
8
gio/tests/schema-tests/default-out-of-range.gschema.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<schemalist>
|
||||
<schema id="test">
|
||||
<key name="test" type="i">
|
||||
<range min="0" max="100" />
|
||||
<default>-1</default>
|
||||
</key>
|
||||
</schema>
|
||||
</schemalist>
|
8
gio/tests/schema-tests/range-missing-max.gschema.xml
Normal file
8
gio/tests/schema-tests/range-missing-max.gschema.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<schemalist>
|
||||
<schema id="test">
|
||||
<key name="test" type="i">
|
||||
<range min="100" />
|
||||
<default>2</default>
|
||||
</key>
|
||||
</schema>
|
||||
</schemalist>
|
8
gio/tests/schema-tests/range-missing-min.gschema.xml
Normal file
8
gio/tests/schema-tests/range-missing-min.gschema.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<schemalist>
|
||||
<schema id="test">
|
||||
<key name="test" type="i">
|
||||
<range max="100" />
|
||||
<default>2</default>
|
||||
</key>
|
||||
</schema>
|
||||
</schemalist>
|
8
gio/tests/schema-tests/range-wrong-type.gschema.xml
Normal file
8
gio/tests/schema-tests/range-wrong-type.gschema.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<schemalist>
|
||||
<schema id="test">
|
||||
<key name="test" type="s">
|
||||
<range min="a" max="z" />
|
||||
<default>"a"</default>
|
||||
</key>
|
||||
</schema>
|
||||
</schemalist>
|
Loading…
x
Reference in New Issue
Block a user