Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Radchenko <radchenkosasha@gmail.com>2018-03-27 08:40:16 +0300
committerDan Moseley <danmose@microsoft.com>2018-03-27 08:40:16 +0300
commit48a6ca80054644f70160f3c454c3cbfe15aabc02 (patch)
tree4ce1ec3603bdd2d94be2dc307d5344ac75d2aa81 /src/System.Private.Xml/tests/Xslt
parent248494c81f4d5da42c7d0940a6d3aa95b6fa3f71 (diff)
Fixed netfs System.Xml.Xsl.XslCompiledTransformApi.Tests fails on non-English Windows (#28357)
Diffstat (limited to 'src/System.Private.Xml/tests/Xslt')
-rw-r--r--src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltSettings.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltSettings.cs b/src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltSettings.cs
index 01d7d5519a..7bfb96f3cc 100644
--- a/src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltSettings.cs
+++ b/src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltSettings.cs
@@ -5,6 +5,7 @@
using Xunit;
using Xunit.Abstractions;
using System.IO;
+using System.Text.RegularExpressions;
using System.Xml.XPath;
using System.Xml.Xsl;
@@ -335,7 +336,12 @@ namespace System.Xml.Tests
StringWriter sw;
var e = Assert.ThrowsAny<XsltException>(() => sw = Transform());
- Assert.Contains("Execution of the 'document()' function was prohibited. Use the XsltSettings.EnableDocumentFunction property to enable it.", e.Message);
+
+ // \p{Pi} any kind of opening quote https://www.compart.com/en/unicode/category/Pi
+ // \p{Pf} any kind of closing quote https://www.compart.com/en/unicode/category/Pf
+ // \p{Po} any kind of punctuation character that is not a dash, bracket, quote or connector https://www.compart.com/en/unicode/category/Po
+ Assert.Matches(@"[\p{Pi}\p{Po}]" + Regex.Escape("document()") + @"[\p{Pf}\p{Po}]", e.Message);
+ Assert.Matches(@"\b" + Regex.Escape("XsltSettings.EnableDocumentFunction") + @"\b", e.Message);
}
}
-} \ No newline at end of file
+}