summaryrefslogtreecommitdiff
path: root/tests/libtracker-data/error
diff options
context:
space:
mode:
authorSam Thursfield <sam@afuera.me.uk>2017-12-27 23:48:20 +0000
committerSam Thursfield <sam@afuera.me.uk>2017-12-28 00:03:02 +0000
commitd73a4aa1192f49c99bf34eef9db33ef1e76d324d (patch)
tree7b400bdac29b14850a6591d1975c3fd1ed85f0a7 /tests/libtracker-data/error
parent9debcfaba93781dbd14980518d31226af47de67e (diff)
downloadtracker-d73a4aa1192f49c99bf34eef9db33ef1e76d324d.tar.gz
tests/libtracker-data: Fix error tests in tracker-sparql-test
The logic for testing if the correct error message was returned was the wrong way round -- the comparer() function should return 0 if the message we got was OK, and 1 otherwise. Also we were calling strstr() backwards, we should look for the expected result inside the actual result and not the other way around. To complicate things, Tracker doesn't return error messages with newlines but on disk the expected output usually contains newlines as editors tend to add them. This makes the tests confusingly fail when they look correct, so we now chomp newlines off the end of the results file for expected error tests. With this fixed, the expected output needed some corrections.
Diffstat (limited to 'tests/libtracker-data/error')
-rw-r--r--tests/libtracker-data/error/query-error-1.out2
-rw-r--r--tests/libtracker-data/error/query-error-2.out2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/libtracker-data/error/query-error-1.out b/tests/libtracker-data/error/query-error-1.out
index c989797be..715bd15f1 100644
--- a/tests/libtracker-data/error/query-error-1.out
+++ b/tests/libtracker-data/error/query-error-1.out
@@ -1 +1 @@
-nknown token
+syntax error, expected `{'
diff --git a/tests/libtracker-data/error/query-error-2.out b/tests/libtracker-data/error/query-error-2.out
index 731dccc3a..4a2b15244 100644
--- a/tests/libtracker-data/error/query-error-2.out
+++ b/tests/libtracker-data/error/query-error-2.out
@@ -1 +1 @@
-nknown property `http://www.w3.org/1999/02/22-rdf-syntax-ns#nonexisting'
+Unknown property `http://www.w3.org/1999/02/22-rdf-syntax-ns#nonexisting'