public void Backwards2_ProducesCorrectIcu() { _collationXml = "<settings backwards=\"on\" /><rules />"; string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(_collationXml); Assert.AreEqual("[backwards 2]", icu); }
public void AlternateNonIgnorableOption_ProducesCorrectIcu() { XElement collationXml = XElement.Parse("<collation><settings alternate=\"non-ignorable\" /><cr /></collation>"); string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(collationXml); Assert.AreEqual("[alternate non-ignorable]", icu); }
public void NoRules_ProducesEmptyString() { XElement collationXml = XElement.Parse("<collation></collation>"); string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(collationXml); Assert.AreEqual(string.Empty, icu); }
public void VariableTop_ProducesCorrectIcu() { XElement collationXml = XElement.Parse("<collation><settings variableTop=\"u41\" /><cr /></collation>"); string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(collationXml); Assert.AreEqual("& A < [variable top]", icu); }
public void Optimize_ProducesCorrectIcu() { XElement collationXml = XElement.Parse("<collation><optimize>[abc]</optimize><cr /></collation>"); string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(collationXml); Assert.AreEqual("[optimize [abc]]", icu); }
public void CaseFirstUpper_ProducesCorrectIcu() { XElement collationXml = XElement.Parse("<collation><settings caseFirst=\"upper\" /><cr /></collation>"); string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(collationXml); Assert.AreEqual("[caseFirst upper]", icu); }
public void HiraganaQOn_ProducesCorrectIcu() { XElement collationXml = XElement.Parse("<collation><settings hiraganaQuaternary=\"on\" /><cr /></collation>"); string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(collationXml); Assert.AreEqual("[hiraganaQ on]", icu); }
public void VariableTop_ProducesCorrectIcu() { _collationXml = "<settings variableTop=\"u41\" /><rules><reset>A</reset></rules>"; string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(_collationXml); Assert.AreEqual("& A < [variable top]", icu); }
public void SuppressContractions_ProducesCorrectIcu() { _collationXml = "<suppress_contractions>[abc]</suppress_contractions><rules />"; string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(_collationXml); Assert.AreEqual("[suppress contractions [abc]]", icu); }
public void HiraganaQOn_ProducesCorrectIcu() { _collationXml = "<settings hiraganaQuaternary=\"on\" /><rules />"; string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(_collationXml); Assert.AreEqual("[hiraganaQ on]", icu); }
public void NumericOn_ProducesCorrectIcu() { _collationXml = "<settings numeric=\"on\" /><rules />"; string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(_collationXml); Assert.AreEqual("[numeric on]", icu); }
public void CaseFirstUpper_ProducesCorrectIcu() { _collationXml = "<settings caseFirst=\"upper\" /><rules />"; string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(_collationXml); Assert.AreEqual("[caseFirst upper]", icu); }
public void CaseLevelOff_ProducesCorrectIcu() { _collationXml = "<settings caseLevel=\"off\" /><rules />"; string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(_collationXml); Assert.AreEqual("[caseLevel off]", icu); }
public void NormalizationOff_ProducesCorrectIcu() { _collationXml = "<settings normalization=\"off\" /><rules />"; string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(_collationXml); Assert.AreEqual("[normalization off]", icu); }
public void NormalizationOff_ProducesCorrectIcu() { XElement collationXml = XElement.Parse("<collation><settings normalization=\"off\" /><cr /></collation>"); string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(collationXml); Assert.AreEqual("[normalization off]", icu); }
public void Optimize_ProducesCorrectIcu() { _collationXml = "<optimize>[abc]</optimize><rules />"; string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(_collationXml); Assert.AreEqual("[optimize [abc]]", icu); }
public void CaseLevelOff_ProducesCorrectIcu() { XElement collationXml = XElement.Parse("<collation><settings caseLevel=\"off\" /><cr /></collation>"); string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(collationXml); Assert.AreEqual("[caseLevel off]", icu); }
public void IcuEscapedCharacter_ProducesCorrectEscapeSequence() { _collationXml = "<rules><reset>\\(</reset></rules>"; string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(_collationXml); Assert.AreEqual("& \\(", icu); }
public void Rules_ProducesCorrectIcu() { XElement collationXml = XElement.Parse("<collation><cr><![CDATA[& a << b << c]]></cr></collation>"); string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(collationXml); Assert.AreEqual("& a << b << c", icu); }
public void IcuUnicodeEscapes_ProducesCorrectSequence() { _collationXml = "<rules><reset>\\u0062</reset><p>\\U00000061</p></rules>"; string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(_collationXml); Assert.AreEqual("& \\u0062 < \\U00000061", icu); }
public void NumericOn_ProducesCorrectIcu() { XElement collationXml = XElement.Parse("<collation><settings numeric=\"on\" /><cr /></collation>"); string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(collationXml); Assert.AreEqual("[numeric on]", icu); }
public void IcuEscapableSequence_ProducesCorrectSequence() { _collationXml = "<rules><reset>k .w</reset></rules>"; string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(_collationXml); Assert.AreEqual("& k' .'w", icu); }
public void SuppressContractions_ProducesCorrectIcu() { XElement collationXml = XElement.Parse("<collation><suppress_contractions>[abc]</suppress_contractions><cr /></collation>"); string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(collationXml); Assert.AreEqual("[suppress contractions [abc]]", icu); }
public void IcuSingleQuote_ProducesCorrectSequence() { _collationXml = "<rules><reset>k'w'</reset></rules>"; string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(_collationXml); Assert.AreEqual("& k''w''", icu); }
public void AlternateShiftedOption_ProducesCorrectIcu() { XElement collationXml = XElement.Parse("<collation><settings alternate=\"shifted\" /><cr /></collation>"); string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(collationXml); Assert.AreEqual("[alternate shifted]", icu); }
public void NoDifference_ProducesCorrectIcu() { _collationXml = "<rules><reset>a</reset><i>b</i></rules>"; string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(_collationXml); Assert.AreEqual("& a = b", icu); }
public void StrengthIOption_ProducesCorrectIcu() { XElement collationXml = XElement.Parse("<collation><settings strength=\"identical\" /><cr /></collation>"); string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(collationXml); Assert.AreEqual("[strength I]", icu); }
public void PrefixAndExpansion_ProducesCorrectIcu() { _collationXml = "<rules><reset>a</reset><x><context>b</context><p>c</p><extend>d</extend></x></rules>"; string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(_collationXml); Assert.AreEqual("& a < b | c / d", icu); }
public void Backwards2_ProducesCorrectIcu() { XElement collationXml = XElement.Parse("<collation><settings backwards=\"on\" /><cr /></collation>"); string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(collationXml); Assert.AreEqual("[backwards 2]", icu); }
public void StrengthIOption_ProducesCorrectIcu() { _collationXml = "<settings strength=\"identical\" /><rules />"; string icu = LdmlCollationParser.GetIcuRulesFromCollationNode(_collationXml); Assert.AreEqual("[strength I]", icu); }