[tracker/wip/carlosg/sparql-parser-ng: 38/43] tests: Add more anonymous/blank nodes tests
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/sparql-parser-ng: 38/43] tests: Add more anonymous/blank nodes tests
- Date: Sat, 3 Nov 2018 13:10:43 +0000 (UTC)
commit d4ca46e8e66014a95a9bd295a2fe98a4001a3114
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Nov 3 13:03:04 2018 +0100
tests: Add more anonymous/blank nodes tests
Some of those combinations were broken in the previous parser, now
that they are handled properly, add tests for them.
tests/libtracker-data/anon/query-3.out | 3 +++
tests/libtracker-data/anon/query-3.rq | 1 +
tests/libtracker-data/anon/query-4.out | 3 +++
tests/libtracker-data/anon/query-4.rq | 1 +
tests/libtracker-data/anon/query-5.out | 4 ++++
tests/libtracker-data/anon/query-5.rq | 1 +
tests/libtracker-data/bnode/query-1.out | 3 +++
tests/libtracker-data/bnode/query-1.rq | 1 +
tests/libtracker-data/bnode/query-2.out | 3 +++
tests/libtracker-data/bnode/query-2.rq | 1 +
tests/libtracker-data/bnode/query-3.out | 4 ++++
tests/libtracker-data/bnode/query-3.rq | 1 +
tests/libtracker-data/bnode/query-4.out | 3 +++
tests/libtracker-data/bnode/query-4.rq | 1 +
tests/libtracker-data/bnode/query-5.out | 3 +++
tests/libtracker-data/bnode/query-5.rq | 1 +
tests/libtracker-data/tracker-sparql-test.c | 8 ++++++++
17 files changed, 42 insertions(+)
---
diff --git a/tests/libtracker-data/anon/query-3.out b/tests/libtracker-data/anon/query-3.out
new file mode 100644
index 000000000..fe1e48f34
--- /dev/null
+++ b/tests/libtracker-data/anon/query-3.out
@@ -0,0 +1,3 @@
+"Alice"
+"Bob"
+"Fred"
diff --git a/tests/libtracker-data/anon/query-3.rq b/tests/libtracker-data/anon/query-3.rq
new file mode 100644
index 000000000..ba9252f0b
--- /dev/null
+++ b/tests/libtracker-data/anon/query-3.rq
@@ -0,0 +1 @@
+select foaf:name(?u) { [] foaf:knows ?u } order by foaf:name(?u)
\ No newline at end of file
diff --git a/tests/libtracker-data/anon/query-4.out b/tests/libtracker-data/anon/query-4.out
new file mode 100644
index 000000000..3970b1c89
--- /dev/null
+++ b/tests/libtracker-data/anon/query-4.out
@@ -0,0 +1,3 @@
+"Alice"
+"Bob"
+"Eve"
diff --git a/tests/libtracker-data/anon/query-4.rq b/tests/libtracker-data/anon/query-4.rq
new file mode 100644
index 000000000..772c1bf8c
--- /dev/null
+++ b/tests/libtracker-data/anon/query-4.rq
@@ -0,0 +1 @@
+select foaf:name(?u) { ?u foaf:knows [] } order by foaf:name(?u)
\ No newline at end of file
diff --git a/tests/libtracker-data/anon/query-5.out b/tests/libtracker-data/anon/query-5.out
new file mode 100644
index 000000000..a0dc77220
--- /dev/null
+++ b/tests/libtracker-data/anon/query-5.out
@@ -0,0 +1,4 @@
+"Alice"
+"Bob"
+"Eve"
+"Fred"
diff --git a/tests/libtracker-data/anon/query-5.rq b/tests/libtracker-data/anon/query-5.rq
new file mode 100644
index 000000000..2f3df0ad5
--- /dev/null
+++ b/tests/libtracker-data/anon/query-5.rq
@@ -0,0 +1 @@
+select ?u { [ a foaf:Person ; foaf:name ?u ] } order by ?u
\ No newline at end of file
diff --git a/tests/libtracker-data/bnode/query-1.out b/tests/libtracker-data/bnode/query-1.out
new file mode 100644
index 000000000..3970b1c89
--- /dev/null
+++ b/tests/libtracker-data/bnode/query-1.out
@@ -0,0 +1,3 @@
+"Alice"
+"Bob"
+"Eve"
diff --git a/tests/libtracker-data/bnode/query-1.rq b/tests/libtracker-data/bnode/query-1.rq
new file mode 100644
index 000000000..7f3f3705c
--- /dev/null
+++ b/tests/libtracker-data/bnode/query-1.rq
@@ -0,0 +1 @@
+select foaf:name(?u) { ?u foaf:knows _:foo . _:foo a foaf:Person } order by foaf:name(?u)
\ No newline at end of file
diff --git a/tests/libtracker-data/bnode/query-2.out b/tests/libtracker-data/bnode/query-2.out
new file mode 100644
index 000000000..3970b1c89
--- /dev/null
+++ b/tests/libtracker-data/bnode/query-2.out
@@ -0,0 +1,3 @@
+"Alice"
+"Bob"
+"Eve"
diff --git a/tests/libtracker-data/bnode/query-2.rq b/tests/libtracker-data/bnode/query-2.rq
new file mode 100644
index 000000000..33b99de9b
--- /dev/null
+++ b/tests/libtracker-data/bnode/query-2.rq
@@ -0,0 +1 @@
+select foaf:name(?u) { _:foo a foaf:Person . ?u foaf:knows _:foo } order by foaf:name(?u)
\ No newline at end of file
diff --git a/tests/libtracker-data/bnode/query-3.out b/tests/libtracker-data/bnode/query-3.out
new file mode 100644
index 000000000..a0dc77220
--- /dev/null
+++ b/tests/libtracker-data/bnode/query-3.out
@@ -0,0 +1,4 @@
+"Alice"
+"Bob"
+"Eve"
+"Fred"
diff --git a/tests/libtracker-data/bnode/query-3.rq b/tests/libtracker-data/bnode/query-3.rq
new file mode 100644
index 000000000..277a204a2
--- /dev/null
+++ b/tests/libtracker-data/bnode/query-3.rq
@@ -0,0 +1 @@
+select ?u { _:foo a foaf:Person ; foaf:name ?u } order by ?u
diff --git a/tests/libtracker-data/bnode/query-4.out b/tests/libtracker-data/bnode/query-4.out
new file mode 100644
index 000000000..3970b1c89
--- /dev/null
+++ b/tests/libtracker-data/bnode/query-4.out
@@ -0,0 +1,3 @@
+"Alice"
+"Bob"
+"Eve"
diff --git a/tests/libtracker-data/bnode/query-4.rq b/tests/libtracker-data/bnode/query-4.rq
new file mode 100644
index 000000000..7f3f3705c
--- /dev/null
+++ b/tests/libtracker-data/bnode/query-4.rq
@@ -0,0 +1 @@
+select foaf:name(?u) { ?u foaf:knows _:foo . _:foo a foaf:Person } order by foaf:name(?u)
\ No newline at end of file
diff --git a/tests/libtracker-data/bnode/query-5.out b/tests/libtracker-data/bnode/query-5.out
new file mode 100644
index 000000000..fe1e48f34
--- /dev/null
+++ b/tests/libtracker-data/bnode/query-5.out
@@ -0,0 +1,3 @@
+"Alice"
+"Bob"
+"Fred"
diff --git a/tests/libtracker-data/bnode/query-5.rq b/tests/libtracker-data/bnode/query-5.rq
new file mode 100644
index 000000000..38fd47855
--- /dev/null
+++ b/tests/libtracker-data/bnode/query-5.rq
@@ -0,0 +1 @@
+select foaf:name(?u) { _:foo a foaf:Person ; foaf:knows ?u } order by foaf:name(?u)
\ No newline at end of file
diff --git a/tests/libtracker-data/tracker-sparql-test.c b/tests/libtracker-data/tracker-sparql-test.c
index 960388f18..f52b9106a 100644
--- a/tests/libtracker-data/tracker-sparql-test.c
+++ b/tests/libtracker-data/tracker-sparql-test.c
@@ -63,6 +63,9 @@ const TestInfo tests[] = {
{ "algebra/var-scope-join-1", "algebra/var-scope-join-1", FALSE },
{ "anon/query", "anon/data", FALSE },
{ "anon/query-2", "anon/data", FALSE },
+ { "anon/query-3", "anon/data", FALSE },
+ { "anon/query-4", "anon/data", FALSE },
+ { "anon/query-5", "anon/data", FALSE },
{ "ask/ask-1", "ask/data", FALSE },
{ "basic/base-prefix-3", "basic/data-1", FALSE },
{ "basic/compare-cast", "basic/data-1", FALSE },
@@ -70,6 +73,11 @@ const TestInfo tests[] = {
{ "basic/predicate-variable-2", "basic/data-1", FALSE },
{ "basic/predicate-variable-3", "basic/data-1", FALSE },
{ "basic/predicate-variable-4", "basic/data-1", FALSE },
+ { "bnode/query-1", "bnode/data", FALSE },
+ { "bnode/query-2", "bnode/data", FALSE },
+ { "bnode/query-3", "bnode/data", FALSE },
+ { "bnode/query-4", "bnode/data", FALSE },
+ { "bnode/query-5", "bnode/data", FALSE },
{ "bnode-coreference/query", "bnode-coreference/data", FALSE },
{ "bound/bound1", "bound/data", FALSE },
{ "datetime/delete-1", "datetime/data-3", FALSE },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]