[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 895d5ac 1/2: Adapt to an 'xmllint' change
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 895d5ac 1/2: Adapt to an 'xmllint' change |
Date: |
Fri, 15 May 2020 17:31:34 -0400 (EDT) |
branch: master
commit 895d5ac0d341b919f447d6123722420492ed8f64
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Adapt to an 'xmllint' change
Apparently 'xmllint' now issues only a single diagnostic per element
where it used to issue two.
---
test_schemata.sh | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/test_schemata.sh b/test_schemata.sh
index 53c81e6..69ec98f 100755
--- a/test_schemata.sh
+++ b/test_schemata.sh
@@ -151,6 +151,13 @@ Element PremiumTaxState failed to validate content
Did not expect element StateOfJurisdictionMangledTag there
sample_bad fails to validate
EOF
+xmllint_version=$(xmllint --version 2>&1 | sed -e'/version/!d' -e's/^.*version
//')
+if [ "$xmllint_version" -ge 20910 ]; then
+# Two lines matching this regex are printed for XSD validation by
+# xmllint for libxml version 20904, but omitted for version 20910.
+# Its behavior for versions between those two is unknown.
+ sed -e '/^Element .*is not a valid value of the atomic type/d' -i
touchstone.eraseme
+fi
# '\/' really is an intentional escape (for sed, not sh).
# shellcheck disable=SC1117