Skip to content

Commit 61ae0ea

Browse files
committed
- [+] add test/Books.xml; but the output order keeps changing
1 parent 3368f2b commit 61ae0ea

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

jsonfiddle_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,7 @@ func TestExec(t *testing.T) {
8181
testIt(t, "MenuItemsJ2S", "j2s", "-i", "MenuItems.json")
8282
testIt(t, "SmartyStreetsJ2S", "j2s", "-i", "SmartyStreets.json")
8383
testIt(t, "SchedulesJ2S", "j2s", "-i", "Schedules.json")
84+
// -- x2j
85+
//t.Logf("\n\n== Testing Basic x2j Functions\n\n")
86+
//testIt(t, "Books", "x2j", "-i", "Books.xml")
8487
}

test/Books.ref

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{"catalog": {"book": [{"-id": "bk101", "author": "Gambardella, Matthew", "title": "XML Developer's Guide", "genre": "Computer", "price": "44.95", "publish_date": "2000-10-01", "description": "An in-depth look at creating applications \n with XML."}, {"price": "5.95", "publish_date": "2000-12-16", "description": "A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world.", "-id": "bk102", "author": "Ralls, Kim", "title": "Midnight Rain", "genre": "Fantasy"}, {"genre": "Fantasy", "price": "5.95", "publish_date": "2000-11-17", "description": "After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society.", "-id": "bk103", "author": "Corets, Eva", "title": "Maeve Ascendant"}]}}
2+

test/Books.xml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0"?>
2+
<catalog>
3+
<book id="bk101">
4+
<author>Gambardella, Matthew</author>
5+
<title>XML Developer's Guide</title>
6+
<genre>Computer</genre>
7+
<price>44.95</price>
8+
<publish_date>2000-10-01</publish_date>
9+
<description>An in-depth look at creating applications
10+
with XML.</description>
11+
</book>
12+
<book id="bk102">
13+
<author>Ralls, Kim</author>
14+
<title>Midnight Rain</title>
15+
<genre>Fantasy</genre>
16+
<price>5.95</price>
17+
<publish_date>2000-12-16</publish_date>
18+
<description>A former architect battles corporate zombies,
19+
an evil sorceress, and her own childhood to become queen
20+
of the world.</description>
21+
</book>
22+
<book id="bk103">
23+
<author>Corets, Eva</author>
24+
<title>Maeve Ascendant</title>
25+
<genre>Fantasy</genre>
26+
<price>5.95</price>
27+
<publish_date>2000-11-17</publish_date>
28+
<description>After the collapse of a nanotechnology
29+
society in England, the young survivors lay the
30+
foundation for a new society.</description>
31+
</book>
32+
</catalog>

0 commit comments

Comments
 (0)