#![cfg(feature = "xml")]
use objio::ObjectReader;
use rdftk_io::xml::XmlReader;
// https://www.w3.org/RDF/Validator/rdfval
pub mod logging;
#[test]
fn read_example_empty_graph() {
let mut xml = r##"
"##
.as_bytes();
logging::try_init();
let reader = XmlReader::default();
let result = reader.read(&mut xml);
println!("{:#?}", result);
assert!(result.is_ok());
let graph = result.unwrap();
println!("{:?}", graph);
assert_eq!(graph.len(), 0);
}
#[test]
#[ignore]
fn read_example_01() {
let mut xml = r##"
language grammar
hello cruelworld
"##
.as_bytes();
logging::try_init();
let reader = XmlReader::default();
let result = reader.read(&mut xml);
assert!(result.is_ok());
let graph = result.unwrap();
for st in graph.statements() {
println!("{}", st);
}
assert_eq!(graph.len(), 6);
}