From 82c5cc6532ac5d0323ecda94b6767e1fdaef2639 Mon Sep 17 00:00:00 2001 From: Karim Pinter Date: Wed, 18 Jan 2017 11:00:13 +0200 Subject: fractionDigits doesn't count the trailing 0s anymore fractionDigits were counting also the trailing 0s, which is against the standard https://www.w3.org/TR/xmlschema-2/#rf-fractionDigits Task-number: QTBUG-58245 Change-Id: I9175d4870de82e25c4df2317394ccfba8048fb48 Reviewed-by: Andy Shaw --- tests/auto/xmlpatternsvalidator/files/fractiondigits.xml | 4 ++++ tests/auto/xmlpatternsvalidator/files/fractiondigits.xsd | 15 +++++++++++++++ .../xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp | 5 +++++ 3 files changed, 24 insertions(+) create mode 100644 tests/auto/xmlpatternsvalidator/files/fractiondigits.xml create mode 100644 tests/auto/xmlpatternsvalidator/files/fractiondigits.xsd (limited to 'tests') diff --git a/tests/auto/xmlpatternsvalidator/files/fractiondigits.xml b/tests/auto/xmlpatternsvalidator/files/fractiondigits.xml new file mode 100644 index 0000000..55c2ee8 --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/fractiondigits.xml @@ -0,0 +1,4 @@ + + + 1234.560000 + diff --git a/tests/auto/xmlpatternsvalidator/files/fractiondigits.xsd b/tests/auto/xmlpatternsvalidator/files/fractiondigits.xsd new file mode 100644 index 0000000..b8f266a --- /dev/null +++ b/tests/auto/xmlpatternsvalidator/files/fractiondigits.xsd @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp b/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp index 8e86dd9..8a11418 100644 --- a/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp +++ b/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp @@ -227,6 +227,11 @@ void tst_XmlPatternsValidator::xsdSupport_data() const << (QStringList() << path + QLatin1String("substitution-group-invalid.xml") << path + QLatin1String("substitution-group.xsd")) << QString(); + QTest::newRow("QTBUG-58245 fraction digits shouldn't take trailing 0 into account") + << 0 + << (QStringList() << path + QLatin1String("fractiondigits.xml") + << path + QLatin1String("fractiondigits.xsd")) + << QString(); } QTEST_MAIN(tst_XmlPatternsValidator) -- cgit v1.2.1