1
1
import { parse } from "./parse.ts"
2
2
import { expect , test } from "@libs/testing"
3
3
4
- test ( "all " ) ( "parse() xml syntax tag" , ( ) =>
4
+ test ( "deno" , "node ") ( "parse() xml syntax tag" , ( ) =>
5
5
expect (
6
6
parse ( `
7
7
<root>hello world</root>
@@ -12,7 +12,7 @@ test("all")("parse() xml syntax tag", () =>
12
12
} ,
13
13
) )
14
14
15
- test ( "all " ) ( "parse(): xml syntax tag with attributes" , ( ) =>
15
+ test ( "deno" , "node ") ( "parse(): xml syntax tag with attributes" , ( ) =>
16
16
expect (
17
17
parse ( `
18
18
<root lang="en" type="greeting">hello world</root>
@@ -27,7 +27,7 @@ test("all")("parse(): xml syntax tag with attributes", () =>
27
27
} ,
28
28
) )
29
29
30
- test ( "all " ) ( "parse(): xml syntax self-closing tag" , ( ) =>
30
+ test ( "deno" , "node ") ( "parse(): xml syntax self-closing tag" , ( ) =>
31
31
expect (
32
32
parse ( `
33
33
<root/>
@@ -38,7 +38,7 @@ test("all")("parse(): xml syntax self-closing tag", () =>
38
38
} ,
39
39
) )
40
40
41
- test ( "all " ) ( "parse(): xml syntax self-closing with attributes" , ( ) =>
41
+ test ( "deno" , "node ") ( "parse(): xml syntax self-closing with attributes" , ( ) =>
42
42
expect (
43
43
parse ( `
44
44
<root lang="en" type="greeting" text="hello world"></root>
@@ -53,7 +53,7 @@ test("all")("parse(): xml syntax self-closing with attributes", () =>
53
53
} ,
54
54
) )
55
55
56
- test ( "all " ) ( "parse(): xml syntax empty tag" , ( ) =>
56
+ test ( "deno" , "node ") ( "parse(): xml syntax empty tag" , ( ) =>
57
57
expect (
58
58
parse ( `
59
59
<root></root>
@@ -64,7 +64,7 @@ test("all")("parse(): xml syntax empty tag", () =>
64
64
} ,
65
65
) )
66
66
67
- test ( "all " ) ( "parse(): xml syntax empty tag with attributes" , ( ) =>
67
+ test ( "deno" , "node ") ( "parse(): xml syntax empty tag with attributes" , ( ) =>
68
68
expect (
69
69
parse ( `
70
70
<root type="test"></root>
@@ -77,7 +77,7 @@ test("all")("parse(): xml syntax empty tag with attributes", () =>
77
77
} ,
78
78
) )
79
79
80
- test ( "all " ) ( "parse(): xml syntax simple tree" , ( ) =>
80
+ test ( "deno" , "node ") ( "parse(): xml syntax simple tree" , ( ) =>
81
81
expect (
82
82
parse ( `
83
83
<root>
@@ -96,7 +96,7 @@ test("all")("parse(): xml syntax simple tree", () =>
96
96
} ,
97
97
) )
98
98
99
- test ( "all " ) ( "parse(): xml syntax simple tree with same tags" , ( ) =>
99
+ test ( "deno" , "node ") ( "parse(): xml syntax simple tree with same tags" , ( ) =>
100
100
expect (
101
101
parse ( `
102
102
<root>
@@ -114,7 +114,7 @@ test("all")("parse(): xml syntax simple tree with same tags", () =>
114
114
} ,
115
115
) )
116
116
117
- test ( "all " ) ( "parse(): xml syntax simple tree with same tags and attributes" , ( ) =>
117
+ test ( "deno" , "node ") ( "parse(): xml syntax simple tree with same tags and attributes" , ( ) =>
118
118
expect (
119
119
parse ( `
120
120
<root>
@@ -137,7 +137,7 @@ test("all")("parse(): xml syntax simple tree with same tags and attributes", ()
137
137
} ,
138
138
) )
139
139
140
- test ( "all " ) ( "parse(): xml syntax simple tree with nested tags of same name" , ( ) =>
140
+ test ( "deno" , "node ") ( "parse(): xml syntax simple tree with nested tags of same name" , ( ) =>
141
141
expect (
142
142
parse ( `
143
143
<root>
@@ -158,7 +158,7 @@ test("all")("parse(): xml syntax simple tree with nested tags of same name", ()
158
158
} ,
159
159
) )
160
160
161
- test ( "all " ) ( "parse(): xml syntax mixed content" , ( ) =>
161
+ test ( "deno" , "node ") ( "parse(): xml syntax mixed content" , ( ) =>
162
162
expect (
163
163
parse ( `
164
164
<root>some <b>bold</b> text</root>
@@ -172,7 +172,7 @@ test("all")("parse(): xml syntax mixed content", () =>
172
172
} ,
173
173
) )
174
174
175
- test ( "all " ) ( "parse(): xml syntax nested mixed content" , ( ) =>
175
+ test ( "deno" , "node ") ( "parse(): xml syntax nested mixed content" , ( ) =>
176
176
expect (
177
177
parse ( `
178
178
<root>some <b>bold <i>italic</i> </b> text</root>
@@ -189,7 +189,7 @@ test("all")("parse(): xml syntax nested mixed content", () =>
189
189
} ,
190
190
) )
191
191
192
- test ( "all " ) ( "parse(): xml syntax xml prolog" , ( ) =>
192
+ test ( "deno" , "node ") ( "parse(): xml syntax xml prolog" , ( ) =>
193
193
expect (
194
194
parse (
195
195
`
@@ -206,7 +206,7 @@ test("all")("parse(): xml syntax xml prolog", () =>
206
206
} ,
207
207
) )
208
208
209
- test . skip ( "all " ) ( "parse(): xml syntax xml stylesheet" , ( ) =>
209
+ test . skip ( "deno" , "node ") ( "parse(): xml syntax xml stylesheet" , ( ) =>
210
210
expect (
211
211
parse (
212
212
`
@@ -229,7 +229,7 @@ test.skip("all")("parse(): xml syntax xml stylesheet", () =>
229
229
} ,
230
230
) )
231
231
232
- test . skip ( "all " ) ( "parse(): xml syntax doctype" , ( ) =>
232
+ test . skip ( "deno" , "node ") ( "parse(): xml syntax doctype" , ( ) =>
233
233
expect (
234
234
parse (
235
235
`
@@ -247,7 +247,7 @@ test.skip("all")("parse(): xml syntax doctype", () =>
247
247
} ,
248
248
) )
249
249
250
- test . skip ( "all " ) ( "parse(): xml syntax doctype with element" , ( ) =>
250
+ test . skip ( "deno" , "node ") ( "parse(): xml syntax doctype with element" , ( ) =>
251
251
expect (
252
252
parse (
253
253
`
@@ -278,7 +278,7 @@ test.skip("all")("parse(): xml syntax doctype with element", () =>
278
278
} ,
279
279
) )
280
280
281
- test ( "all " ) ( "parse(): xml syntax case sensitive" , ( ) =>
281
+ test ( "deno" , "node ") ( "parse(): xml syntax case sensitive" , ( ) =>
282
282
expect (
283
283
parse ( `
284
284
<root>
@@ -308,7 +308,7 @@ test("all")("parse(): xml syntax case sensitive", () =>
308
308
} ,
309
309
) )
310
310
311
- test ( "all " ) ( "parse(): xml syntax defined entities" , ( ) =>
311
+ test ( "deno" , "node ") ( "parse(): xml syntax defined entities" , ( ) =>
312
312
expect (
313
313
parse ( `
314
314
<root>
@@ -321,7 +321,7 @@ test("all")("parse(): xml syntax defined entities", () =>
321
321
} ,
322
322
) )
323
323
324
- test ( "all " ) ( "parse: xml syntax decimal entity reference" , ( ) =>
324
+ test ( "deno" , "node ") ( "parse: xml syntax decimal entity reference" , ( ) =>
325
325
expect (
326
326
parse ( `
327
327
<root>
@@ -334,7 +334,7 @@ test("all")("parse: xml syntax decimal entity reference", () =>
334
334
} ,
335
335
) )
336
336
337
- test ( "all " ) ( "parse: xml syntax hexadecimal entity reference" , ( ) =>
337
+ test ( "deno" , "node ") ( "parse: xml syntax hexadecimal entity reference" , ( ) =>
338
338
expect (
339
339
parse ( `
340
340
<root>
@@ -347,7 +347,7 @@ test("all")("parse: xml syntax hexadecimal entity reference", () =>
347
347
} ,
348
348
) )
349
349
350
- test ( "all " ) ( "parse(): xml syntax comments" , ( ) =>
350
+ test ( "deno" , "node ") ( "parse(): xml syntax comments" , ( ) =>
351
351
expect (
352
352
parse ( `
353
353
<root>
@@ -368,7 +368,7 @@ test("all")("parse(): xml syntax comments", () =>
368
368
} ,
369
369
) )
370
370
371
- test ( "all " ) ( "parse(): xml syntax white spaces preserved" , ( ) =>
371
+ test ( "deno" , "node ") ( "parse(): xml syntax white spaces preserved" , ( ) =>
372
372
expect (
373
373
parse ( `
374
374
<root>
@@ -383,7 +383,7 @@ are you?`,
383
383
} ,
384
384
) )
385
385
386
- test ( "all " ) ( "parse(): xml syntax CDATA" , ( ) =>
386
+ test ( "deno" , "node ") ( "parse(): xml syntax CDATA" , ( ) =>
387
387
expect (
388
388
parse ( `
389
389
<root>
@@ -407,7 +407,7 @@ test("all")("parse(): xml syntax CDATA", () =>
407
407
} ,
408
408
) )
409
409
410
- test ( "all " ) ( "parse(): xml syntax mixed content with CDATA" , ( ) =>
410
+ test ( "deno" , "node ") ( "parse(): xml syntax mixed content with CDATA" , ( ) =>
411
411
expect (
412
412
parse ( `
413
413
<root>
@@ -432,7 +432,7 @@ test("all")("parse(): xml syntax mixed content with CDATA", () =>
432
432
} ,
433
433
) )
434
434
435
- test ( "all " ) ( "parse(): xml syntax with multiple CDATA's" , ( ) =>
435
+ test ( "deno" , "node ") ( "parse(): xml syntax with multiple CDATA's" , ( ) =>
436
436
expect (
437
437
parse ( `
438
438
<root>
@@ -450,7 +450,7 @@ test("all")("parse(): xml syntax with multiple CDATA's", () =>
450
450
} ,
451
451
) )
452
452
453
- test ( "all " ) ( "parse(): xml space preserve" , ( ) =>
453
+ test ( "deno" , "node ") ( "parse(): xml space preserve" , ( ) =>
454
454
expect (
455
455
parse ( `
456
456
<root>
@@ -530,7 +530,7 @@ Deno.test("parse: xml syntax first character", () => {
530
530
531
531
//Example below were taken from https://www.w3schools.com/xml/default.asp
532
532
533
- test ( "all " ) ( "parse(): xml example w3schools.com#1" , ( ) =>
533
+ test ( "deno" , "node ") ( "parse(): xml example w3schools.com#1" , ( ) =>
534
534
expect (
535
535
parse ( `
536
536
<note>
@@ -551,7 +551,7 @@ test("all")("parse(): xml example w3schools.com#1", () =>
551
551
} ,
552
552
) )
553
553
554
- test ( "all " ) ( "parse(): xml example w3schools.com#2" , ( ) =>
554
+ test ( "deno" , "node ") ( "parse(): xml example w3schools.com#2" , ( ) =>
555
555
expect (
556
556
parse ( `
557
557
<note>
@@ -574,7 +574,7 @@ test("all")("parse(): xml example w3schools.com#2", () =>
574
574
} ,
575
575
) )
576
576
577
- test ( "all " ) ( "parse(): xml example w3schools.com#3" , ( ) =>
577
+ test ( "deno" , "node ") ( "parse(): xml example w3schools.com#3" , ( ) =>
578
578
expect (
579
579
parse ( `
580
580
<bookstore>
@@ -657,7 +657,7 @@ test("all")("parse(): xml example w3schools.com#3", () =>
657
657
} ,
658
658
) )
659
659
660
- test ( "all " ) ( "parse(): xml example w3schools.com#4" , ( ) =>
660
+ test ( "deno" , "node ") ( "parse(): xml example w3schools.com#4" , ( ) =>
661
661
expect (
662
662
parse ( `
663
663
<nitf>
@@ -700,7 +700,7 @@ test("all")("parse(): xml example w3schools.com#4", () =>
700
700
} ,
701
701
) )
702
702
703
- test ( "all " ) ( "parse(): xml example w3schools.com#5" , ( ) =>
703
+ test ( "deno" , "node ") ( "parse(): xml example w3schools.com#5" , ( ) =>
704
704
expect (
705
705
parse (
706
706
`
@@ -785,7 +785,7 @@ test("all")("parse(): xml example w3schools.com#5", () =>
785
785
} ,
786
786
) )
787
787
788
- test ( "all " ) ( "parse(): xml example w3schools.com#6" , ( ) =>
788
+ test ( "deno" , "node ") ( "parse(): xml example w3schools.com#6" , ( ) =>
789
789
expect (
790
790
parse ( `
791
791
<breakfast_menu>
@@ -872,7 +872,7 @@ test("all")("parse(): xml example w3schools.com#6", () =>
872
872
873
873
// Parser options
874
874
875
- test ( "all " ) ( "parse: xml parser option no flatten text" , ( ) =>
875
+ test ( "deno" , "node ") ( "parse: xml parser option no flatten text" , ( ) =>
876
876
expect (
877
877
parse (
878
878
`
@@ -896,7 +896,7 @@ test("all")("parse: xml parser option no flatten text", () =>
896
896
} ,
897
897
) )
898
898
899
- test ( "all " ) ( "parse(): xml parser option revive" , ( ) =>
899
+ test ( "deno" , "node ") ( "parse(): xml parser option revive" , ( ) =>
900
900
expect (
901
901
parse (
902
902
`
@@ -924,7 +924,7 @@ test("all")("parse(): xml parser option revive", () =>
924
924
} ,
925
925
) )
926
926
927
- test ( "all " ) ( "parse(): xml parser option no-revive" , ( ) =>
927
+ test ( "deno" , "node ") ( "parse(): xml parser option no-revive" , ( ) =>
928
928
expect (
929
929
parse (
930
930
`
@@ -952,7 +952,7 @@ test("all")("parse(): xml parser option no-revive", () =>
952
952
} ,
953
953
) )
954
954
955
- test . skip ( "all " ) ( "parse: xml parser reviver" , ( ) =>
955
+ test . skip ( "deno" , "node ") ( "parse: xml parser reviver" , ( ) =>
956
956
expect (
957
957
parse (
958
958
`
@@ -1043,7 +1043,7 @@ Deno.test("parse: xml parser reviver (tag node can be edited)", () =>
1043
1043
1044
1044
// Metadata
1045
1045
1046
- test("all ")("parse(): xml parser option metadata", () => {
1046
+ test("deno", "node ")("parse(): xml parser option metadata", () => {
1047
1047
const xml = parse(
1048
1048
`
1049
1049
<root>
0 commit comments