diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2020-12-26 14:01:13 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2020-12-26 14:09:49 +0100 |
commit | 439e08f3d188896f391f2afb6086bcad1cd99679 (patch) | |
tree | 04fb34f8c730aa50bd12360cfe1c2cd2ca783b25 | |
parent | 0b25059e853235dc46ffa17d1261d6e3f4d303c9 (diff) | |
download | tracker-wip/carlosg/fix-cursor-string-length.tar.gz |
tests: Test that we get all expected rows and columns in portalwip/carlosg/fix-cursor-string-length
This would catch the situation at
https://gitlab.gnome.org/GNOME/tracker/-/issues/282, if reverting
the previous commit.
-rw-r--r-- | tests/functional-tests/portal.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/functional-tests/portal.py b/tests/functional-tests/portal.py index a4e82820f..194f4e86b 100644 --- a/tests/functional-tests/portal.py +++ b/tests/functional-tests/portal.py @@ -57,6 +57,21 @@ class TestPortal(fixtures.TrackerPortalTest): self.assertEqual(len(res), 1) self.assertEqual(res[0][0], 'b') + def test_04_rows_cols(self): + self.start_service('org.freedesktop.PortalTest') + res = self.query( + 'org.freedesktop.PortalTest', + 'select ?a ?b { VALUES (?a ?b) { (1 2) (3 4) (5 6) } }') + self.assertEqual(len(res), 3) + self.assertEqual(res[0][0], '1') + self.assertEqual(res[0][1], '2') + self.assertEqual(len(res[0]), 2) + self.assertEqual(res[1][0], '3') + self.assertEqual(res[1][1], '4') + self.assertEqual(len(res[1]), 2) + self.assertEqual(res[2][0], '5') + self.assertEqual(res[2][1], '6') + self.assertEqual(len(res[2]), 2) if __name__ == '__main__': fixtures.tracker_test_main() |