mirror of https://github.com/AxioDL/tinyxml2.git
Add test case for element names with leading digit.
This commit is contained in:
parent
c6d02f48d5
commit
95b3e6543b
|
@ -1037,9 +1037,16 @@ int main( int /*argc*/, const char ** /*argv*/ )
|
||||||
{
|
{
|
||||||
const char* xml = "<element _attr1=\"foo\" :attr2=\"bar\"></element>";
|
const char* xml = "<element _attr1=\"foo\" :attr2=\"bar\"></element>";
|
||||||
XMLDocument doc;
|
XMLDocument doc;
|
||||||
doc.Parse(xml);
|
doc.Parse( xml );
|
||||||
XMLTest("Non-alpha attribute lead character parses.", doc.Error(), false);
|
XMLTest("Non-alpha attribute lead character parses.", doc.Error(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
const char* xml = "<3lement></3lement>";
|
||||||
|
XMLDocument doc;
|
||||||
|
doc.Parse( xml );
|
||||||
|
XMLTest("Element names with lead digit fail to parse.", doc.Error(), true);
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
const char* xml = "<element/>WOA THIS ISN'T GOING TO PARSE";
|
const char* xml = "<element/>WOA THIS ISN'T GOING TO PARSE";
|
||||||
|
|
Loading…
Reference in New Issue