Skip to content

Commit

Permalink
Add end-to-end tests for new features
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinqian00 committed Feb 6, 2024
1 parent f2f2ecd commit 8600e7b
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dev-resources/test-fixtures/inputs/query/select/select-12.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
;; SELECT with lists
{:select [?x]
:where [[?s ?p (1 ?x 3 4)]]}
7 changes: 7 additions & 0 deletions dev-resources/test-fixtures/inputs/query/select/select-13.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
;; SELECT with blank node vectors
{:prefixes {:$ "<http://foo.org/>"
:foaf "<http://xmlns.com/foaf/0.1/>"}
:select [?x ?name]
:where [[[:p1 "v"] :q1 "w"]
[:x :q2 [:p2 "v"]]
[[:foaf/name ?name :foaf/mbox "<mailto:bar@example.com>"]]]}
4 changes: 4 additions & 0 deletions dev-resources/test-fixtures/inputs/query/select/select-14.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
;; SELECT with both lists and blank node vectors
{:prefixes {:$ "<http://foo.org/>"}
:select [?x]
:where [{(1 [:p :q] (2 ?x)) {}}]}
4 changes: 4 additions & 0 deletions dev-resources/test-fixtures/outputs/query/select/select-12.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SELECT ?x
WHERE {
?s ?p ( 1 ?x 3 4 ) .
}
9 changes: 9 additions & 0 deletions dev-resources/test-fixtures/outputs/query/select/select-13.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
PREFIX : <http://foo.org/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?x ?name
WHERE {
[ :p1 "v" ] :q1 "w" .
:x :q2 [ :p2 "v" ] .
[ foaf:name ?name ;
foaf:mbox <mailto:bar@example.com> ] .
}
5 changes: 5 additions & 0 deletions dev-resources/test-fixtures/outputs/query/select/select-14.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PREFIX : <http://foo.org/>
SELECT ?x
WHERE {
( 1 [ :p :q ] ( 2 ?x ) ) .
}

0 comments on commit 8600e7b

Please sign in to comment.