[tracker] tests: Add test for doubly escaped codepoints



commit 3c9d6490522305a043325cc42ea84702013247e1
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Feb 22 23:43:40 2019 +0100

    tests: Add test for doubly escaped codepoints
    
    Also tests escaped codepoints in other parts of the query, they
    may happen anywhere in the query as per
    https://www.w3.org/TR/sparql11-query/#codepointEscape

 tests/libtracker-data/basic/codepoint-escaping.out | 1 +
 tests/libtracker-data/basic/codepoint-escaping.rq  | 3 +++
 tests/libtracker-data/tracker-sparql-test.c        | 1 +
 3 files changed, 5 insertions(+)
---
diff --git a/tests/libtracker-data/basic/codepoint-escaping.out 
b/tests/libtracker-data/basic/codepoint-escaping.out
new file mode 100644
index 000000000..d45173be6
--- /dev/null
+++ b/tests/libtracker-data/basic/codepoint-escaping.out
@@ -0,0 +1 @@
+"α\udddd🐩"     "d:x ns:p"
diff --git a/tests/libtracker-data/basic/codepoint-escaping.rq 
b/tests/libtracker-data/basic/codepoint-escaping.rq
new file mode 100644
index 000000000..510e68d5b
--- /dev/null
+++ b/tests/libtracker-data/basic/codepoint-escaping.rq
@@ -0,0 +1,3 @@
+SELECT "\u03B1\\udddd🐩" ?t {
+  ?u ns\u003Ap ?t
+}
diff --git a/tests/libtracker-data/tracker-sparql-test.c b/tests/libtracker-data/tracker-sparql-test.c
index 2db5166ae..79f1e2107 100644
--- a/tests/libtracker-data/tracker-sparql-test.c
+++ b/tests/libtracker-data/tracker-sparql-test.c
@@ -74,6 +74,7 @@ const TestInfo tests[] = {
        { "basic/predicate-variable-3", "basic/data-1", FALSE },
        { "basic/predicate-variable-4", "basic/data-1", FALSE },
        { "basic/urn-in-as", "basic/data-1", FALSE },
+       { "basic/codepoint-escaping", "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]