[tracker/wip/carlosg/more-sparql-fixes: 2/5] tests: Add basic test around long string literals




commit 635b224cece673495e9d45a1f88af5e2f1814b58
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Mar 24 11:18:13 2022 +0100

    tests: Add basic test around long string literals
    
    Ensure these are parsed correctly, and are able to contain quotes
    of the same nature.

 tests/libtracker-data/basic/long-strings.out | 1 +
 tests/libtracker-data/basic/long-strings.rq  | 1 +
 tests/libtracker-data/tracker-sparql-test.c  | 1 +
 3 files changed, 3 insertions(+)
---
diff --git a/tests/libtracker-data/basic/long-strings.out b/tests/libtracker-data/basic/long-strings.out
new file mode 100644
index 000000000..28c6e7be9
--- /dev/null
+++ b/tests/libtracker-data/basic/long-strings.out
@@ -0,0 +1 @@
+"hello"        "This is a "quoted" string"     "hello" "This is a 'quoted' string"
diff --git a/tests/libtracker-data/basic/long-strings.rq b/tests/libtracker-data/basic/long-strings.rq
new file mode 100644
index 000000000..9b7abccf9
--- /dev/null
+++ b/tests/libtracker-data/basic/long-strings.rq
@@ -0,0 +1 @@
+SELECT ("""hello""" AS ?a) ("""This is a "quoted" string""" AS ?b) ('''hello''' AS ?b) ('''This is a 
'quoted' string''' AS ?d) {}
diff --git a/tests/libtracker-data/tracker-sparql-test.c b/tests/libtracker-data/tracker-sparql-test.c
index 8dddd6a74..0ffc3a7b6 100644
--- a/tests/libtracker-data/tracker-sparql-test.c
+++ b/tests/libtracker-data/tracker-sparql-test.c
@@ -88,6 +88,7 @@ const TestInfo tests[] = {
        { "basic/predicate-variable-4", "basic/data-1", FALSE },
        { "basic/urn-in-as", "basic/data-1", FALSE },
        { "basic/codepoint-escaping", "basic/data-1", FALSE },
+       { "basic/long-strings", "basic/data-1", FALSE },
        { "bnode/query-1", "bnode/data", FALSE },
        { "bnode/query-2", "bnode/data", FALSE },
        { "bnode/query-3", "bnode/data", FALSE },


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]