Prints to sterr the failing negative SPARQL tests

pull/10/head
Tpt 6 years ago
parent 04dd67c493
commit 5afc8b4314
  1. 6
      src/rio/turtle/mod.rs
  2. 7
      src/sparql/parser.rs
  3. 2
      src/sparql/sparql_grammar.rustpeg
  4. 8
      tests/rdf_test_cases.rs

@ -44,10 +44,8 @@ mod grammar {
let mut string_buffer = String::default();
BufReader::new(source).read_to_string(&mut string_buffer)?;
match turtleDoc(&string_buffer, &mut state, &mut triple_buffer) {
Ok(_) => Ok(triple_buffer.into_iter()),
Err(error) => Err(error.into()),
}
turtleDoc(&string_buffer, &mut state, &mut triple_buffer)?;
Ok(triple_buffer.into_iter())
}
}

@ -298,13 +298,10 @@ mod grammar {
let mut string_buffer = String::default();
BufReader::new(source).read_to_string(&mut string_buffer)?;
match QueryUnit(
Ok(QueryUnit(
&unescape_unicode_codepoints(Cow::from(string_buffer)),
&mut state,
) {
Ok(query) => Ok(query),
Err(error) => Err(error.into()),
}
)?)
}
}

@ -1074,7 +1074,7 @@ PERCENT -> () = "%" HEX HEX
HEX -> () = ([0-9A-Fa-f])
//[173]
PN_LOCAL_ESC -> char = "\\" c:$([_~\.\-!$&'()*+,;=/?#@%:]) { c.chars().next().unwrap() } //TODO: added '/' to make tests pass but is it valid?
PN_LOCAL_ESC -> char = "\\" c:$([_~\.\-!$&'()*+,;=/?#@%]) { c.chars().next().unwrap() } //TODO: added '/' to make tests pass but is it valid?
//space
_ = #quiet<([ \t\n\r] / comment)*>

@ -157,11 +157,9 @@ fn sparql_w3c_syntax_testsuite() {
}
} else if test.kind == "NegativeSyntaxTest11" {
//TODO
/*assert!(
client.load_sparql_query(test.action.clone()).is_err(),
"Failure on {}",
test
);*/
if let Ok(result) = client.load_sparql_query(test.action.clone()) {
eprintln!("Failure on {}. The output tree is: {}", test, result);
}
} else {
assert!(false, "Not supported test: {}", test);
}

Loading…
Cancel
Save