Răsfoiți Sursa

whitespace tests and review

Lee Thomason (grinliz) 13 ani în urmă
părinte
comite
0fa8299d99
1 a modificat fișierele cu 7 adăugiri și 0 ștergeri
  1. 7 0
      xmltest.cpp

+ 7 - 0
xmltest.cpp

@@ -965,6 +965,13 @@ int main( int /*argc*/, const char ** /*argv*/ )
 			XMLTest( "Whitespace collapse", "This is ' text '", parent->GetText() );
 		}
 	}
+
+	{
+		const char* xml = "<element>    </element>";
+		XMLDocument doc( true, COLLAPSE_WHITESPACE );
+		doc.Parse( xml );
+		XMLTest( "Whitespace  all space", true, 0 == doc.FirstChildElement()->FirstChild() );
+	}
 	
 	// ----------- Performance tracking --------------
 	{