[tracker/wip/carlosg/sparql-corners: 10/12] tests: Add tests for SERVICE queries with empty/pointless patterns
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/sparql-corners: 10/12] tests: Add tests for SERVICE queries with empty/pointless patterns
- Date: Mon, 1 Mar 2021 23:51:50 +0000 (UTC)
commit 3f24096396aadca64651f203e6c1f84b99b4916b
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Feb 27 13:09:09 2021 +0100
tests: Add tests for SERVICE queries with empty/pointless patterns
Test that the service graph pattern comes up empty if there is
no pattern/variables to project.
tests/libtracker-data/service/service-empty-1.out | 0
tests/libtracker-data/service/service-empty-1.rq | 4 ++++
tests/libtracker-data/service/service-empty-2.out | 0
tests/libtracker-data/service/service-empty-2.rq | 5 +++++
tests/libtracker-data/tracker-service-test.c | 2 ++
5 files changed, 11 insertions(+)
---
diff --git a/tests/libtracker-data/service/service-empty-1.out
b/tests/libtracker-data/service/service-empty-1.out
new file mode 100644
index 000000000..e69de29bb
diff --git a/tests/libtracker-data/service/service-empty-1.rq
b/tests/libtracker-data/service/service-empty-1.rq
new file mode 100644
index 000000000..476290070
--- /dev/null
+++ b/tests/libtracker-data/service/service-empty-1.rq
@@ -0,0 +1,4 @@
+SELECT ?u {
+ SERVICE <dbus:%s> {
+ }
+}
diff --git a/tests/libtracker-data/service/service-empty-2.out
b/tests/libtracker-data/service/service-empty-2.out
new file mode 100644
index 000000000..e69de29bb
diff --git a/tests/libtracker-data/service/service-empty-2.rq
b/tests/libtracker-data/service/service-empty-2.rq
new file mode 100644
index 000000000..688f584b9
--- /dev/null
+++ b/tests/libtracker-data/service/service-empty-2.rq
@@ -0,0 +1,5 @@
+SELECT ?u {
+ SERVICE <dbus:%s> {
+ SELECT 42 { }
+ }
+}
diff --git a/tests/libtracker-data/tracker-service-test.c b/tests/libtracker-data/tracker-service-test.c
index f2e67e468..5fd33e3f9 100644
--- a/tests/libtracker-data/tracker-service-test.c
+++ b/tests/libtracker-data/tracker-service-test.c
@@ -43,6 +43,8 @@ const TestInfo tests[] = {
{ "service/service-union-with-local-2", FALSE },
{ "service/service-var-1", FALSE },
{ "service/service-var-2", FALSE },
+ { "service/service-empty-1", FALSE },
+ { "service/service-empty-2", FALSE },
};
static GDBusConnection *dbus_conn = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]