Allows to run RDF-star and SPARQL-star test suites

pull/171/head
Tpt 4 years ago
parent cd36119d88
commit ed4b5fe280
  1. 3
      .gitmodules
  2. 1
      testsuite/rdf-star
  3. 2
      testsuite/src/files.rs
  4. 45
      testsuite/tests/sparql.rs

3
.gitmodules vendored

@ -1,6 +1,9 @@
[submodule "testsuite/rdf-tests"]
path = testsuite/rdf-tests
url = https://github.com/w3c/rdf-tests.git
[submodule "testsuite/rdf-star"]
path = testsuite/rdf-star
url = https://github.com/w3c/rdf-star.git
[submodule "bench/bsbm-tools"]
path = bench/bsbm-tools
url = https://github.com/Tpt/bsbm-tools.git

@ -0,0 +1 @@
Subproject commit 9788f05491a036f11eb0e0e57f2c7a8da49d8b48

@ -22,6 +22,8 @@ pub fn read_file(url: &str) -> Result<impl BufRead> {
"http://www.w3.org/2009/sparql/docs/tests/",
"rdf-tests/sparql11/",
))
} else if url.starts_with("https://w3c.github.io/rdf-star/") {
Ok(url.replace("https://w3c.github.io/", ""))
} else if url.starts_with("https://github.com/oxigraph/oxigraph/tests/") {
Ok(url.replace(
"https://github.com/oxigraph/oxigraph/tests/",

@ -128,3 +128,48 @@ fn sparql11_tsv_w3c_evaluation_testsuite() -> Result<()> {
],
)
}
#[test]
fn sparql_star_query_syntax_testsuite() -> Result<()> {
run_testsuite(
"https://w3c.github.io/rdf-star/tests/sparql/syntax/manifest.ttl",
vec![
// SPARQL* is not implemented yet
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-1",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-2",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-3",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-4",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-5",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-6",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-7",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-ann-01",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-ann-02",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-ann-03",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-ann-04",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-ann-05",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-ann-06",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-ann-07",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-ann-08",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-ann-09",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-bnode-1",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-bnode-2",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-bnode-3",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-compound-1",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-expr-1",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-expr-2",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-expr-6",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-inside-1",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-inside-2",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-nested-1",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-nested-2",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-update-1",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-update-2",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-update-3",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-update-4",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-update-5",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-update-6",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-update-7",
"https://w3c.github.io/rdf-star/tests/sparql/syntax#sparql-star-update-8",
],
)
}

Loading…
Cancel
Save