Nicolas Cannasse 15 years ago
parent
commit
974f28d3a8
2 changed files with 16 additions and 0 deletions
  1. 15 0
      tests/unit/TestXML.hx
  2. 1 0
      tests/unit/unit.hxp

+ 15 - 0
tests/unit/TestXML.hx

@@ -0,0 +1,15 @@
+package unit;
+
+class TestXML extends Test {
+
+	function textXML() {
+		var x = Xml.parse('<a href="hello">World<b/></a>');
+		eq( x.nodeName, "a" );
+		eq( x.get("href"), "hello" );
+		eq( x.get("other"), null );
+		eq( x.firstChild().nodeValue, "World" );
+
+		exc( function() Xml.parse("<node>") );
+	}
+
+}

+ 1 - 0
tests/unit/unit.hxp

@@ -54,5 +54,6 @@
     <file path="TestResource.hx" />
     <file path="TestSerialize.hx" />
     <file path="TestType.hx" />
+    <file path="TestXML.hx" />
   </files>
 </haxe>