1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/*
Bjoern Hoehrmann via HST 2013-09-18
*/
#[cfg(all(test, feature = "test-conformance-xml"))]
use std::fs;
#[cfg(all(test, feature = "test-conformance-xml"))]
use chadpath::item::Node;
#[cfg(all(test, feature = "test-conformance-xml"))]
use chadpath::parser::{ParseError, xml};
#[cfg(all(test, feature = "test-conformance-xml"))]
use chadpath::trees::smite::RNode;
#[cfg(all(test, feature = "test-conformance-xml"))]
fn test_eduni_misc_notwf(xmldoc: &str) {
let testxml = RNode::new_document();
let parseresult = xml::parse(
testxml,
xmldoc,
Some(|_: &_| Err(ParseError::MissingNameSpace)),
);
assert!(parseresult.is_err());
}
#[test]
#[cfg(all(test, feature = "test-conformance-xml"))]
fn hstbh001() {
/*
Test ID:hst-bh-001
Test URI:001.xml
Spec Sections:2.2 [2], 4.1 [66]
Description:decimal charref > 10FFFF, indeed > max 32 bit integer, checking for recovery from possible overflow
*/
test_eduni_misc_notwf(
fs::read_to_string("tests/conformance/xml/xmlconf/eduni/misc/001.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(all(test, feature = "test-conformance-xml"))]
fn hstbh002() {
/*
Test ID:hst-bh-002
Test URI:002.xml
Spec Sections:2.2 [2], 4.1 [66]
Description:hex charref > 10FFFF, indeed > max 32 bit integer, checking for recovery from possible overflow
*/
test_eduni_misc_notwf(
fs::read_to_string("tests/conformance/xml/xmlconf/eduni/misc/002.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(all(test, feature = "test-conformance-xml"))]
fn hstbh003() {
/*
Test ID:hst-bh-003
Test URI:003.xml
Spec Sections:2.2 [2], 4.1 [66]
Description:decimal charref > 10FFFF, indeed > max 64 bit integer, checking for recovery from possible overflow
*/
test_eduni_misc_notwf(
fs::read_to_string("tests/conformance/xml/xmlconf/eduni/misc/003.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[cfg(all(test, feature = "test-conformance-xml"))]
fn hstbh004() {
/*
Test ID:hst-bh-004
Test URI:004.xml
Spec Sections:2.2 [2], 4.1 [66]
Description:hex charref > 10FFFF, indeed > max 64 bit integer, checking for recovery from possible overflow
*/
test_eduni_misc_notwf(
fs::read_to_string("tests/conformance/xml/xmlconf/eduni/misc/004.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[ignore]
#[cfg(all(test, feature = "test-conformance-xml"))]
fn hstlhs007() {
/*
Test ID:hst-lhs-007
Test URI:007.xml
Spec Sections:4.3.3
Description:UTF-8 BOM plus xml decl of iso-8859-1 incompatible
*/
test_eduni_misc_notwf(
fs::read_to_string("tests/conformance/xml/xmlconf/eduni/misc/007.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[ignore]
#[cfg(all(test, feature = "test-conformance-xml"))]
fn hstlhs008() {
/*
Test ID:hst-lhs-008
Test URI:008.xml
Spec Sections:4.3.3
Description:UTF-16 BOM plus xml decl of utf-8 (using UTF-16 coding) incompatible
*/
test_eduni_misc_notwf(
fs::read_to_string("tests/conformance/xml/xmlconf/eduni/misc/008.xml")
.unwrap()
.as_str(),
);
}
#[test]
#[ignore]
#[cfg(all(test, feature = "test-conformance-xml"))]
fn hstlhs009() {
/*
Test ID:hst-lhs-009
Test URI:009.xml
Spec Sections:4.3.3
Description:UTF-16 BOM plus xml decl of utf-8 (using UTF-8 coding) incompatible
*/
test_eduni_misc_notwf(
fs::read_to_string("tests/conformance/xml/xmlconf/eduni/misc/009.xml")
.unwrap()
.as_str(),
);
}