Various fixes and improvements
This commit is contained in:
1 parent
d77d00a4eb
commit
6e97cc5d9e
13 files changed
+134
-66
No files matched your search
@@ -8,7 +8,9 @@ namespace Tests
|
||||
@it("creates valid XML")
|
||||
function _()
|
||||
xml = new XmlObject()
|
||||
xml.Comment("This is a person.")
|
||||
if xml.Node("Person", { "name": `John "Joker" Doe`, "age": 30 })
|
||||
xml.Comment("This is the address.")
|
||||
xml.EmptyNode("Address", { "street": "123 Main St", "city": "Anytown", "state": "NY" })
|
||||
if xml.Node("Metadata")
|
||||
xml.TextNode("Data", "Some data")
|
||||
@@ -18,7 +20,9 @@ namespace Tests
|
||||
end if
|
||||
|
||||
expected = `<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- This is a person. -->
|
||||
<Person age="30" name="John "Joker" Doe">
|
||||
<!-- This is the address. -->
|
||||
<Address city="Anytown" state="NY" street="123 Main St" />
|
||||
<Metadata>
|
||||
<Data>Some data</Data>
|
||||
|
||||
Reference in new issue
Block a user