diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-01-09 17:45:17 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-01-21 11:42:12 +0000 |
commit | 8456f52f4a37b445d9ae82f616d419702ac86179 (patch) | |
tree | a45a4c102079c546fecdf1b644ca0a81bd900416 /tests | |
parent | b3fb86ea9cfc7062240aa8527dbc0a9ac897396e (diff) | |
download | tracker-8456f52f4a37b445d9ae82f616d419702ac86179.tar.gz |
Fix fts:offsets()
Since the fts4 branch was merged, the fts:offsets() function has been
broken, because it assumed that properties were stored in the 'fts' table
in ID order but this was no longer the case.
The property names list is now created on init as static data, but this
requires having the 'fulltext_indexed' property available in all cases
where previously it has only been available if the ontologies were loaded
directly rather than from the GVDB cache.
tests/functional-tests/03-fts-functions.py has been improved to test the
fts:offsets() function more thoroughly.
https://bugzilla.gnome.org/show_bug.cgi?id=721880
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/functional-tests/03-fts-functions.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/functional-tests/03-fts-functions.py b/tests/functional-tests/03-fts-functions.py index 07b6af2f5..f9434e6ab 100755 --- a/tests/functional-tests/03-fts-functions.py +++ b/tests/functional-tests/03-fts-functions.py @@ -117,9 +117,9 @@ class TestFTSFunctions (CommonTrackerStoreTest): results = self.tracker.query (query) self.assertEquals (len(results), 3) - self.assertEquals (len (results[0][0].split(",")), 4) # (u'151,1,161,1') - self.assertEquals (len (results[1][0].split(",")), 2) # (u'161,1') - self.assertEquals (len (results[2][0].split(",")), 6) # (u'151,1,151,2,161,1') + self.assertEquals (results[0][0], 'nco:fullname,0,nco:nickname,0') + self.assertEquals (results[1][0], 'nco:fullname,0') + self.assertEquals (results[2][0], 'nco:fullname,0,nco:nickname,0,nco:nickname,10') delete_sparql = """ DELETE { |