Commit 7e09abe1 authored by Carlos Garnacho's avatar Carlos Garnacho

tests: Add a bunch of property path tests

Alternative, recursive, optional paths are tested, and combinations
of those.
parent 0d5c1a65
Pipeline #47876 passed with stage
in 3 minutes and 1 second
"Alice" "Bob"
"Alice" "Foo"
"Bob" "Alice"
"Bob" "Foo"
"Eve" "Fred"
select foaf:name(?u) foaf:name(?a) { ?u a foaf:Person . ?u foaf:knows|foaf:member ?a } order by foaf:name(?u) foaf:name(?a)
\ No newline at end of file
select foaf:name(?u) { ?u a foaf:Person . ?u foaf:name|(foaf:member/foaf:name) "Alice" } order by foaf:name(?u)
\ No newline at end of file
select foaf:name(?a) foaf:name(?b) { ?a ^(foaf:knows/foaf:knows) ?b } order by foaf:name(?a) foaf:name(?b)
\ No newline at end of file
"Alice" "Alice"
"Alice" "Bob"
"Alice" "Foo"
"Bob" "Alice"
"Bob" "Bob"
"Bob" "Foo"
"Eve" "Fred"
select foaf:name(?u) foaf:name(?a) { ?u foaf:knows+|foaf:member ?a } order by foaf:name(?u) foaf:name(?a)
\ No newline at end of file
"Alice" "Alice"
"Alice" "Bob"
"Alice" "Foo"
"Bob" "Alice"
"Bob" "Bob"
"Bob" "Foo"
"Eve" "Fred"
select foaf:name(?u) foaf:name(?a) { ?u (foaf:knows|foaf:member)+ ?a } order by foaf:name(?u) foaf:name(?a)
\ No newline at end of file
select foaf:name(?u) foaf:name(?a) { ?u ^foaf:knows+ ?a . ?u foaf:name 'Fred' }
\ No newline at end of file
select foaf:name(?u) foaf:name(?a) { ?u ^(foaf:knows+) ?a . ?u foaf:name 'Fred' }
\ No newline at end of file
select foaf:name(?u) foaf:name(?a) { ?u (^foaf:knows)+ ?a . ?u foaf:name 'Fred' }
\ No newline at end of file
select foaf:name(?u) { ?u foaf:knows*/foaf:name 'Alice' } order by foaf:name(?u)
\ No newline at end of file
select foaf:name(?u) foaf:name(?a) { ?u foaf:name 'Alice'; foaf:knows? ?a } order by foaf:name(?u) foaf:name(?a)
\ No newline at end of file
select foaf:name(?u) foaf:name(?a) { ?u foaf:knows* ?a . FILTER (foaf:name(?u) = 'Alice') }
\ No newline at end of file
select foaf:name(?u) foaf:name(?a) { ?u foaf:knows+ ?a . FILTER (?u != ?a && foaf:name(?u) = 'Alice') } order by foaf:name(?u) foaf:name(?a)
\ No newline at end of file
......@@ -155,8 +155,20 @@ const TestInfo tests[] = {
{ "property-paths/sequence-path-1", "property-paths/data", FALSE },
{ "property-paths/sequence-path-2", "property-paths/data", FALSE },
{ "property-paths/sequence-path-3", "property-paths/data", FALSE },
{ "property-paths/optional-path-1", "property-paths/data", FALSE },
{ "property-paths/recursive-path-1", "property-paths/data", FALSE },
{ "property-paths/recursive-path-2", "property-paths/data", FALSE },
{ "property-paths/alternative-path-1", "property-paths/data", FALSE },
{ "property-paths/alternative-path-2", "property-paths/data", FALSE },
{ "property-paths/mixed-inverse-and-sequence-1", "property-paths/data", FALSE },
{ "property-paths/mixed-inverse-and-sequence-2", "property-paths/data", FALSE },
{ "property-paths/mixed-inverse-and-sequence-3", "property-paths/data", FALSE },
{ "property-paths/mixed-recursive-and-sequence-1", "property-paths/data", FALSE },
{ "property-paths/mixed-recursive-and-alternative-1", "property-paths/data", FALSE },
{ "property-paths/mixed-recursive-and-alternative-2", "property-paths/data", FALSE },
{ "property-paths/mixed-recursive-and-inverse-1", "property-paths/data", FALSE },
{ "property-paths/mixed-recursive-and-inverse-2", "property-paths/data", FALSE },
{ "property-paths/mixed-recursive-and-inverse-3", "property-paths/data", FALSE },
/* Update tests */
{ "update/insert-data-query-1", "update/insert-data-1", FALSE, FALSE },
{ "update/insert-data-query-2", "update/insert-data-2", FALSE, TRUE },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment