[glom] Make DTD validation tests exit on failure



commit 82d5985b9338068cf9f31b8f88e61a8880005a3e
Author: David King <davidk openismus com>
Date:   Tue Mar 30 12:04:00 2010 +0200

    Make DTD validation tests exit on failure
    
    * tests/test_dtd_file_validation.sh:
    * tests/test_glade_file_validation.sh: Append â?? || exit 1â?? to the
    xmllint call, to ensure that a validation failure leads to a failing
    test.

 ChangeLog                           |    9 +++++++++
 tests/test_dtd_file_validation.sh   |    3 +--
 tests/test_glade_file_validation.sh |    3 +--
 3 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index bcccf7b..ecc0b47 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-03-30  David King  <davidk openismus com>
+
+	Make DTD validation tests exit on failure
+
+	* tests/test_dtd_file_validation.sh:
+	* tests/test_glade_file_validation.sh: Append â?? || exit 1â?? to the
+	xmllint call, to ensure that a validation failure leads to a failing
+	test.
+
 2010-03-30  Daniel Borgmann  <danielb openismus com>
 
 	Capitalisation fixes.
diff --git a/tests/test_dtd_file_validation.sh b/tests/test_dtd_file_validation.sh
index 64e596d..bc2beec 100755
--- a/tests/test_dtd_file_validation.sh
+++ b/tests/test_dtd_file_validation.sh
@@ -3,6 +3,5 @@
 for x in $(find ${srcdir}/examples/ -name "*.glom")
 do
   # echo Validating $x
-  xmllint --noout --dtdvalid ${srcdir}/glom/glom_document.dtd \
-    $x
+  xmllint --noout --dtdvalid ${srcdir}/glom/glom_document.dtd $x || exit 1
 done
diff --git a/tests/test_glade_file_validation.sh b/tests/test_glade_file_validation.sh
index 6a1af98..7f82317 100755
--- a/tests/test_glade_file_validation.sh
+++ b/tests/test_glade_file_validation.sh
@@ -4,6 +4,5 @@ for x in $(find ${srcdir}/glom/ -name "*.glade")
 do
   # echo Validating $x
   # TODO: Is there a Glade DTD?
-  xmllint --noout \
-    $x
+  xmllint --noout $x || exit 1
 done



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