diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2022-05-04 23:35:27 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2022-05-04 23:52:57 +0200 |
commit | 460e694dcfefbb94f028fa01861c817e0362aa15 (patch) | |
tree | efa0578f6bc744bfe865ec761691b66464011691 /tests | |
parent | 26f5af29a9e7955025134454c28d342747d47265 (diff) | |
download | tracker-460e694dcfefbb94f028fa01861c817e0362aa15.tar.gz |
tests: Add FTS tests for partial updates and INSERT OR REPLACE changes
Test paths fixed by the previous commits.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fts/consistency/insert-or-replace-1.out | 1 | ||||
-rw-r--r-- | tests/fts/consistency/insert-or-replace-1.rq | 1 | ||||
-rw-r--r-- | tests/fts/consistency/insert-or-replace-2.out | 0 | ||||
-rw-r--r-- | tests/fts/consistency/insert-or-replace-2.rq | 1 | ||||
-rw-r--r-- | tests/fts/consistency/insert-or-replace-data.rq | 7 | ||||
-rw-r--r-- | tests/fts/consistency/partial-update-1.out | 0 | ||||
-rw-r--r-- | tests/fts/consistency/partial-update-1.rq | 1 | ||||
-rw-r--r-- | tests/fts/consistency/partial-update-2.out | 1 | ||||
-rw-r--r-- | tests/fts/consistency/partial-update-2.rq | 1 | ||||
-rw-r--r-- | tests/fts/consistency/partial-update-data.rq | 11 | ||||
-rw-r--r-- | tests/fts/tracker-fts-test.c | 2 |
11 files changed, 26 insertions, 0 deletions
diff --git a/tests/fts/consistency/insert-or-replace-1.out b/tests/fts/consistency/insert-or-replace-1.out new file mode 100644 index 000000000..db6765d23 --- /dev/null +++ b/tests/fts/consistency/insert-or-replace-1.out @@ -0,0 +1 @@ +"http://www.example.org/test#1" diff --git a/tests/fts/consistency/insert-or-replace-1.rq b/tests/fts/consistency/insert-or-replace-1.rq new file mode 100644 index 000000000..794ae3ea4 --- /dev/null +++ b/tests/fts/consistency/insert-or-replace-1.rq @@ -0,0 +1 @@ +SELECT ?u { ?u fts:match 'two' } diff --git a/tests/fts/consistency/insert-or-replace-2.out b/tests/fts/consistency/insert-or-replace-2.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/fts/consistency/insert-or-replace-2.out diff --git a/tests/fts/consistency/insert-or-replace-2.rq b/tests/fts/consistency/insert-or-replace-2.rq new file mode 100644 index 000000000..8223fa858 --- /dev/null +++ b/tests/fts/consistency/insert-or-replace-2.rq @@ -0,0 +1 @@ +SELECT ?u { ?u fts:match 'one' } diff --git a/tests/fts/consistency/insert-or-replace-data.rq b/tests/fts/consistency/insert-or-replace-data.rq new file mode 100644 index 000000000..3101faf81 --- /dev/null +++ b/tests/fts/consistency/insert-or-replace-data.rq @@ -0,0 +1,7 @@ +INSERT OR REPLACE { + test:1 a test:A ; test:p "one" . +}; + +INSERT OR REPLACE { + test:1 a test:A ; test:p "two" . +}; diff --git a/tests/fts/consistency/partial-update-1.out b/tests/fts/consistency/partial-update-1.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/fts/consistency/partial-update-1.out diff --git a/tests/fts/consistency/partial-update-1.rq b/tests/fts/consistency/partial-update-1.rq new file mode 100644 index 000000000..66b5311dd --- /dev/null +++ b/tests/fts/consistency/partial-update-1.rq @@ -0,0 +1 @@ +SELECT ?u { ?u fts:match "two" } diff --git a/tests/fts/consistency/partial-update-2.out b/tests/fts/consistency/partial-update-2.out new file mode 100644 index 000000000..db6765d23 --- /dev/null +++ b/tests/fts/consistency/partial-update-2.out @@ -0,0 +1 @@ +"http://www.example.org/test#1" diff --git a/tests/fts/consistency/partial-update-2.rq b/tests/fts/consistency/partial-update-2.rq new file mode 100644 index 000000000..6e4c74daa --- /dev/null +++ b/tests/fts/consistency/partial-update-2.rq @@ -0,0 +1 @@ +select ?u { ?u fts:match 'three' } diff --git a/tests/fts/consistency/partial-update-data.rq b/tests/fts/consistency/partial-update-data.rq new file mode 100644 index 000000000..25b172a9e --- /dev/null +++ b/tests/fts/consistency/partial-update-data.rq @@ -0,0 +1,11 @@ +INSERT DATA { + test:1 a test:A ; test:p "one" ; test:q "two" . +}; + +DELETE DATA { + test:1 test:q "two" . +} + +INSERT DATA { + test:1 test:q "three" . +}; diff --git a/tests/fts/tracker-fts-test.c b/tests/fts/tracker-fts-test.c index baffbc3b4..b05da1aee 100644 --- a/tests/fts/tracker-fts-test.c +++ b/tests/fts/tracker-fts-test.c @@ -35,6 +35,8 @@ struct _TestInfo { const TestInfo tests[] = { { "fts3aa", 3 }, { "fts3ae", 1 }, + { "consistency/partial-update", 2 }, + { "consistency/insert-or-replace", 2 }, { "prefix/fts3prefix", 3 }, { "limits/fts3limits", 4 }, { "input/fts3input", 3 }, |