mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-29 08:36:45 +01:00
oops - ncnames don't contain colons
This commit is contained in:
parent
27d23630ce
commit
934a03e703
2 changed files with 8 additions and 3 deletions
|
@ -26,7 +26,6 @@ namespace XML
|
|||
(c == Unicode<wchar_t>::FULL_STOP) ||
|
||||
(c == Unicode<wchar_t>::HYPHEN_MINUS) ||
|
||||
(c == Unicode<wchar_t>::LOW_LINE) ||
|
||||
(c == Unicode<wchar_t>::COLON) ||
|
||||
is_combining_char(c) ||
|
||||
is_extender(c)))
|
||||
return false;
|
||||
|
|
|
@ -30,14 +30,19 @@ public:
|
|||
|
||||
void test4()
|
||||
{
|
||||
assertTrue(is_ncname("a:b"));
|
||||
assertTrue(is_ncname("a_b"));
|
||||
} // test4
|
||||
|
||||
void test5()
|
||||
{
|
||||
assertFalse(is_ncname(":b"));
|
||||
assertFalse(is_ncname("a:b"));
|
||||
} // test5
|
||||
|
||||
void test6()
|
||||
{
|
||||
assertFalse(is_ncname("xsl:foo"));
|
||||
} // test6
|
||||
|
||||
}; // class XMLStringTest
|
||||
|
||||
TestSuite* XMLStringTest_suite()
|
||||
|
@ -49,6 +54,7 @@ TestSuite* XMLStringTest_suite()
|
|||
suiteOfTests->addTest(new TestCaller<XMLStringTest>("test3", &XMLStringTest::test3));
|
||||
suiteOfTests->addTest(new TestCaller<XMLStringTest>("test4", &XMLStringTest::test4));
|
||||
suiteOfTests->addTest(new TestCaller<XMLStringTest>("test5", &XMLStringTest::test5));
|
||||
suiteOfTests->addTest(new TestCaller<XMLStringTest>("test6", &XMLStringTest::test6));
|
||||
|
||||
return suiteOfTests;
|
||||
} // XMLStringTest_suite
|
||||
|
|
Loading…
Add table
Reference in a new issue