[dconf-editor] Add test_dtd.



commit 02e4b818cc42afdfef38632ebc8a4f72fdf58403
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Wed Dec 6 02:20:31 2017 +0100

    Add test_dtd.

 editor/ca.desrt.dconf-editor.gschema.xml |    4 ++--
 editor/meson.build                       |   15 +++++++++++++--
 2 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/editor/ca.desrt.dconf-editor.gschema.xml b/editor/ca.desrt.dconf-editor.gschema.xml
index f928d5c..5c1055a 100644
--- a/editor/ca.desrt.dconf-editor.gschema.xml
+++ b/editor/ca.desrt.dconf-editor.gschema.xml
@@ -53,8 +53,8 @@
 
   <!-- range is only allowed for keys with numeric type -->
   <!ELEMENT range EMPTY >
-  <!-- min and max must be parseable as values of the key type and -->
-  <!-- min less-than or equal to max -->
+  <!-- min and max must be parseable as values of the key type and
+       min less-than or equal to max -->
   <!ATTLIST range min CDATA #REQUIRED
                   max CDATA #REQUIRED >
 
diff --git a/editor/meson.build b/editor/meson.build
index 11d2707..3c67bc2 100644
--- a/editor/meson.build
+++ b/editor/meson.build
@@ -34,11 +34,22 @@ i18n.merge_file(
   install_dir: join_paths(dconf_editor_datadir, 'metainfo')
 )
 
+gschema = dconf_editor_namespace + '.gschema.xml'
+dconf_editor_schemadir = join_paths(dconf_editor_datadir, 'glib-2.0', 'schemas')
 install_data(
-  dconf_editor_namespace + '.gschema.xml',
-  install_dir: join_paths(dconf_editor_datadir, 'glib-2.0', 'schemas')
+  gschema,
+  install_dir: dconf_editor_schemadir
 )
 
+xmllint = find_program('xmllint', required : false)
+if xmllint.found()
+  test('test_dtd', xmllint, args: ['--valid',
+                                   '--noout', '--nowarning',
+                                   join_paths(dconf_editor_schemadir, gschema)])
+else
+  message('xmllint not found, no gschema DTD verification')
+endif
+
 install_subdir(
   'icons',
   install_dir: dconf_editor_datadir


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]