[evolution-data-server/openismus-work-master: 22/137] Migrated sqlite cursor test cases to not specify any specific collation rule.



commit 110e3eaa07acd18278b5b027358b5f4d9daa70ec
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Fri May 17 21:17:44 2013 +0900

    Migrated sqlite cursor test cases to not specify any specific collation rule.

 tests/libedata-book/data-test-utils.c              |   15 +-------
 tests/libedata-book/data-test-utils.h              |    4 +--
 .../test-sqlite-cursor-de-DE-migrated.c            |   13 +------
 .../test-sqlite-cursor-en-US-migrated.c            |    3 +-
 .../test-sqlite-cursor-fr-CA-migrated.c            |    3 +-
 .../test-sqlite-cursor-move-by-de-DE.c             |   38 +++-----------------
 .../test-sqlite-cursor-move-by-en-US.c             |   38 +++-----------------
 .../test-sqlite-cursor-move-by-fr-CA.c             |   38 +++-----------------
 .../test-sqlite-cursor-move-by-posix.c             |   39 +++-----------------
 .../test-sqlite-cursor-posix-initial.c             |   13 ++-----
 .../test-sqlite-cursor-posix-migrated.c            |    3 +-
 11 files changed, 31 insertions(+), 176 deletions(-)
---
diff --git a/tests/libedata-book/data-test-utils.c b/tests/libedata-book/data-test-utils.c
index 7bea05a..9e548ce 100644
--- a/tests/libedata-book/data-test-utils.c
+++ b/tests/libedata-book/data-test-utils.c
@@ -216,12 +216,6 @@ e_sqlitedb_cursor_fixture_setup_book (ESource            *scratch,
                                                           E_CONTACT_GIVEN_NAME, E_BOOK_INDEX_PREFIX,
                                                           E_CONTACT_EMAIL, E_BOOK_INDEX_PREFIX,
                                                           0);
-
-       if (data->phonebook_order)
-               e_source_backend_summary_setup_set_collations (setup,
-                                                              E_CONTACT_FAMILY_NAME, "phonebook",
-                                                              E_CONTACT_GIVEN_NAME, "phonebook",
-                                                              0);
 }
 
 void
@@ -399,7 +393,6 @@ print_results (GSList      *results)
 
 static MoveByData *
 move_by_test_new_internal (const gchar *test_path,
-                          gboolean     phonebook_order,
                           gsize        struct_size)
 {
        MoveByData *data;
@@ -407,7 +400,6 @@ move_by_test_new_internal (const gchar *test_path,
        data = g_slice_alloc0 (struct_size);
        data->parent.parent.type = E_TEST_SERVER_ADDRESS_BOOK;
        data->parent.parent.customize = e_sqlitedb_cursor_fixture_setup_book;
-       data->parent.phonebook_order = phonebook_order;
        data->path = g_strdup (test_path);
        data->struct_size = struct_size;
 
@@ -426,12 +418,9 @@ move_by_test_free (MoveByData *data)
 }
 
 MoveByData *
-move_by_test_new (const gchar *test_path,
-                 gboolean     phonebook_order)
+move_by_test_new (const gchar *test_path)
 {
-       return move_by_test_new_internal (test_path,
-                                         phonebook_order,
-                                         sizeof (MoveByData));
+       return move_by_test_new_internal (test_path, sizeof (MoveByData));
 }
 
 static void
diff --git a/tests/libedata-book/data-test-utils.h b/tests/libedata-book/data-test-utils.h
index b8474a2..3c413f8 100644
--- a/tests/libedata-book/data-test-utils.h
+++ b/tests/libedata-book/data-test-utils.h
@@ -87,7 +87,6 @@ typedef struct {
 typedef struct {
        ETestServerClosure parent;
 
-       gboolean phonebook_order;
 } EbSdbCursorClosure;
 
 typedef struct {
@@ -140,8 +139,7 @@ void     print_results                     (GSList      *results);
 void        move_by_test_add_assertion     (MoveByData  *data,
                                            gint         count,
                                            ...);
-MoveByData *move_by_test_new               (const gchar *test_path,
-                                           gboolean     phonebook_order);
+MoveByData *move_by_test_new               (const gchar *test_path);
 void        move_by_test_add               (MoveByData  *data,
                                            gboolean     filtered);
 
diff --git a/tests/libedata-book/test-sqlite-cursor-de-DE-migrated.c 
b/tests/libedata-book/test-sqlite-cursor-de-DE-migrated.c
index 11692d2..d281635 100644
--- a/tests/libedata-book/test-sqlite-cursor-de-DE-migrated.c
+++ b/tests/libedata-book/test-sqlite-cursor-de-DE-migrated.c
@@ -21,18 +21,7 @@ main (gint argc,
        g_assert (g_setenv ("EDS_COLLATE", "de_DE.UTF-8", TRUE));
        g_assert (g_setenv ("MIGRATION_TEST_SOURCE_NAME", "migration-test-source", TRUE));
 
-       /* Here we rely on the initial addressbook book created by
-        * test-sqlite-cursor-posix-initial, which created the addressbook
-        * with the phonebook collation rule.
-        *
-        * Here we assert that the SQLite introspection works properly after
-        * a migration, and the recorded SQLite collation names are used instead of the
-        * parameters when opening the addressbook (since we pass FALSE here
-        * to move_by_test_new(), we create our addressbook with no special collation rule).
-        */
-       data = move_by_test_new ("/EbSdbCursor/Locale/de_DE/Migrated", FALSE);
-
-       /* Assert the whole set of contacts */
+       data = move_by_test_new ("/EbSdbCursor/Locale/de_DE/Migrated");
        move_by_test_add_assertion (data, 5, 11, 1,  2,  5,  6);
        move_by_test_add_assertion (data, 5, 7,  8,  4,  3,  15);
        move_by_test_add_assertion (data, 5, 17, 16, 18, 10, 14);
diff --git a/tests/libedata-book/test-sqlite-cursor-en-US-migrated.c 
b/tests/libedata-book/test-sqlite-cursor-en-US-migrated.c
index dd0a098..01d1c47 100644
--- a/tests/libedata-book/test-sqlite-cursor-en-US-migrated.c
+++ b/tests/libedata-book/test-sqlite-cursor-en-US-migrated.c
@@ -22,8 +22,7 @@ main (gint argc,
        g_assert (g_setenv ("EDS_COLLATE", "en_US.UTF-8", TRUE));
        g_assert (g_setenv ("MIGRATION_TEST_SOURCE_NAME", "migration-test-source", TRUE));
 
-       /* Try them all once in the normal base locale */
-       data = move_by_test_new ("/EbSdbCursor/Locale/en_US/Migrated", FALSE);
+       data = move_by_test_new ("/EbSdbCursor/Locale/en_US/Migrated");
        move_by_test_add_assertion (data, 5, 11, 1,  2,  5,  6);
        move_by_test_add_assertion (data, 5, 4,  3,  7,  8,  15);
        move_by_test_add_assertion (data, 5, 17, 16, 18, 10, 14);
diff --git a/tests/libedata-book/test-sqlite-cursor-fr-CA-migrated.c 
b/tests/libedata-book/test-sqlite-cursor-fr-CA-migrated.c
index 932e7c6..e70b709 100644
--- a/tests/libedata-book/test-sqlite-cursor-fr-CA-migrated.c
+++ b/tests/libedata-book/test-sqlite-cursor-fr-CA-migrated.c
@@ -21,8 +21,7 @@ main (gint argc,
        g_assert (g_setenv ("EDS_COLLATE", "fr_CA.UTF-8", TRUE));
        g_assert (g_setenv ("MIGRATION_TEST_SOURCE_NAME", "migration-test-source", TRUE));
 
-       /* Assert the whole set of contacts */
-       data = move_by_test_new ("/EbSdbCursor/Locale/fr_CA/Migrated", FALSE);
+       data = move_by_test_new ("/EbSdbCursor/Locale/fr_CA/Migrated");
        move_by_test_add_assertion (data, 5, 11, 1,  2,  5,  6);
        move_by_test_add_assertion (data, 5, 4,  3,  7,  8,  15);
        move_by_test_add_assertion (data, 5, 17, 16, 18, 10, 14);
diff --git a/tests/libedata-book/test-sqlite-cursor-move-by-de-DE.c 
b/tests/libedata-book/test-sqlite-cursor-move-by-de-DE.c
index c3c2a18..7638ea7 100644
--- a/tests/libedata-book/test-sqlite-cursor-move-by-de-DE.c
+++ b/tests/libedata-book/test-sqlite-cursor-move-by-de-DE.c
@@ -20,55 +20,27 @@ main (gint argc,
        /* Ensure that the client and server get the same locale */
        g_assert (g_setenv ("EDS_COLLATE", "de_DE.UTF-8", TRUE));
 
-       /* Try them all once in the normal base locale */
-       data = move_by_test_new ("/EbSdbCursor/de_DE/Move/Forward", FALSE);
-       move_by_test_add_assertion (data, 5, 11, 1, 2, 5, 6);
-       move_by_test_add_assertion (data, 6, 4, 3, 7, 8, 15, 17);
-       move_by_test_add (data, FALSE);
-
-       data = move_by_test_new ("/EbSdbCursor/de_DE/Move/ForwardOnNameless", FALSE);
-       move_by_test_add_assertion (data, 1, 11);
-       move_by_test_add_assertion (data, 3, 1, 2, 5);
-       move_by_test_add (data, FALSE);
-
-       data = move_by_test_new ("/EbSdbCursor/de_DE/Move/Backwards", FALSE);
-       move_by_test_add_assertion (data, -5, 20, 19, 9, 13, 12);
-       move_by_test_add_assertion (data, -8, 14, 10, 18, 16, 17, 15, 8, 7);
-       move_by_test_add (data, FALSE);
-
-       data = move_by_test_new ("/EbSdbCursor/de_DE/Filtered/Move/Forward", FALSE);
-       move_by_test_add_assertion (data, 5, 11, 1, 2, 5, 3);
-       move_by_test_add_assertion (data, 8, 8, 17, 16, 18, 10, 14, 12, 9);
-       move_by_test_add (data, TRUE);
-
-       data = move_by_test_new ("/EbSdbCursor/de_DE/Filtered/Move/Backwards", FALSE);
-       move_by_test_add_assertion (data, -5, 9, 12, 14, 10, 18);
-       move_by_test_add_assertion (data, -8, 16, 17, 8, 3, 5, 2, 1, 11);
-       move_by_test_add (data, TRUE);
-
-
-       /* Try them all again with collation = phonebook */
-       data = move_by_test_new ("/EbSdbCursor/de_DE collation=phonebook/Move/Forward", TRUE);
+       data = move_by_test_new ("/EbSdbCursor/de_DE/Move/Forward");
        move_by_test_add_assertion (data, 5, 11, 1, 2, 5, 6);
        move_by_test_add_assertion (data, 6, 7, 8, 4, 3, 15, 17);
        move_by_test_add (data, FALSE);
 
-       data = move_by_test_new ("/EbSdbCursor/de_DE collation=phonebook/Move/ForwardOnNameless", TRUE);
+       data = move_by_test_new ("/EbSdbCursor/de_DE/Move/ForwardOnNameless");
        move_by_test_add_assertion (data, 1, 11);
        move_by_test_add_assertion (data, 3, 1, 2, 5);
        move_by_test_add (data, FALSE);
 
-       data = move_by_test_new ("/EbSdbCursor/de_DE collation=phonebook/Move/Backwards", TRUE);
+       data = move_by_test_new ("/EbSdbCursor/de_DE/Move/Backwards");
        move_by_test_add_assertion (data, -5, 19, 20, 9, 13, 12);
        move_by_test_add_assertion (data, -8, 14, 10, 18, 16, 17, 15, 3, 4);
        move_by_test_add (data, FALSE);
 
-       data = move_by_test_new ("/EbSdbCursor/de_DE collation=phonebook/Filtered/Move/Forward", TRUE);
+       data = move_by_test_new ("/EbSdbCursor/de_DE/Filtered/Move/Forward");
        move_by_test_add_assertion (data, 5, 11, 1, 2, 5, 8);
        move_by_test_add_assertion (data, 8, 3, 17, 16, 18, 10, 14, 12, 9);
        move_by_test_add (data, TRUE);
 
-       data = move_by_test_new ("/EbSdbCursor/de_DE collation=phonebook/Filtered/Move/Backwards", TRUE);
+       data = move_by_test_new ("/EbSdbCursor/de_DE/Filtered/Move/Backwards");
        move_by_test_add_assertion (data, -5, 9, 12, 14, 10, 18);
        move_by_test_add_assertion (data, -8, 16, 17, 3, 8, 5, 2, 1, 11);
        move_by_test_add (data, TRUE);
diff --git a/tests/libedata-book/test-sqlite-cursor-move-by-en-US.c 
b/tests/libedata-book/test-sqlite-cursor-move-by-en-US.c
index 697bf7d..7c095ec 100644
--- a/tests/libedata-book/test-sqlite-cursor-move-by-en-US.c
+++ b/tests/libedata-book/test-sqlite-cursor-move-by-en-US.c
@@ -20,55 +20,27 @@ main (gint argc,
        /* Ensure that the client and server get the same locale */
        g_assert (g_setenv ("EDS_COLLATE", "en_US.UTF-8", TRUE));
 
-       /* Try them all once in the normal base locale */
-       data = move_by_test_new ("/EbSdbCursor/en_US/Move/Forward", FALSE);
+       data = move_by_test_new ("/EbSdbCursor/en_US/Move/Forward");
        move_by_test_add_assertion (data, 5, 11, 1, 2, 5, 6);
        move_by_test_add_assertion (data, 6, 4, 3, 7, 8, 15, 17);
        move_by_test_add (data, FALSE);
 
-       data = move_by_test_new ("/EbSdbCursor/en_US/Move/ForwardOnNameless", FALSE);
+       data = move_by_test_new ("/EbSdbCursor/en_US/Move/ForwardOnNameless");
        move_by_test_add_assertion (data, 1, 11);
        move_by_test_add_assertion (data, 3, 1, 2, 5);
        move_by_test_add (data, FALSE);
 
-       data = move_by_test_new ("/EbSdbCursor/en_US/Move/Backwards", FALSE);
+       data = move_by_test_new ("/EbSdbCursor/en_US/Move/Backwards");
        move_by_test_add_assertion (data, -5, 20, 19, 9, 13, 12);
        move_by_test_add_assertion (data, -8, 14, 10, 18, 16, 17, 15, 8, 7);
        move_by_test_add (data, FALSE);
 
-       data = move_by_test_new ("/EbSdbCursor/en_US/Filtered/Move/Forward", FALSE);
+       data = move_by_test_new ("/EbSdbCursor/en_US/Filtered/Move/Forward");
        move_by_test_add_assertion (data, 5, 11, 1, 2, 5, 3);
        move_by_test_add_assertion (data, 8, 8, 17, 16, 18, 10, 14, 12, 9);
        move_by_test_add (data, TRUE);
 
-       data = move_by_test_new ("/EbSdbCursor/en_US/Filtered/Move/Backwards", FALSE);
-       move_by_test_add_assertion (data, -5, 9, 12, 14, 10, 18);
-       move_by_test_add_assertion (data, -8, 16, 17, 8, 3, 5, 2, 1, 11);
-       move_by_test_add (data, TRUE);
-
-
-       /* Try them all again with collation = phonebook */
-       data = move_by_test_new ("/EbSdbCursor/en_US collation=phonebook/Move/Forward", TRUE);
-       move_by_test_add_assertion (data, 5, 11, 1, 2, 5, 6);
-       move_by_test_add_assertion (data, 6, 4, 3, 7, 8, 15, 17);
-       move_by_test_add (data, FALSE);
-
-       data = move_by_test_new ("/EbSdbCursor/en_US collation=phonebook/Move/ForwardOnNameless", TRUE);
-       move_by_test_add_assertion (data, 1, 11);
-       move_by_test_add_assertion (data, 3, 1, 2, 5);
-       move_by_test_add (data, FALSE);
-
-       data = move_by_test_new ("/EbSdbCursor/en_US collation=phonebook/Move/Backwards", TRUE);
-       move_by_test_add_assertion (data, -5, 20, 19, 9, 13, 12);
-       move_by_test_add_assertion (data, -8, 14, 10, 18, 16, 17, 15, 8, 7);
-       move_by_test_add (data, FALSE);
-
-       data = move_by_test_new ("/EbSdbCursor/en_US collation=phonebook/Filtered/Move/Forward", TRUE);
-       move_by_test_add_assertion (data, 5, 11, 1, 2, 5, 3);
-       move_by_test_add_assertion (data, 8, 8, 17, 16, 18, 10, 14, 12, 9);
-       move_by_test_add (data, TRUE);
-
-       data = move_by_test_new ("/EbSdbCursor/en_US collation=phonebook/Filtered/Move/Backwards", TRUE);
+       data = move_by_test_new ("/EbSdbCursor/en_US/Filtered/Move/Backwards");
        move_by_test_add_assertion (data, -5, 9, 12, 14, 10, 18);
        move_by_test_add_assertion (data, -8, 16, 17, 8, 3, 5, 2, 1, 11);
        move_by_test_add (data, TRUE);
diff --git a/tests/libedata-book/test-sqlite-cursor-move-by-fr-CA.c 
b/tests/libedata-book/test-sqlite-cursor-move-by-fr-CA.c
index 654fba8..3c7ecdd 100644
--- a/tests/libedata-book/test-sqlite-cursor-move-by-fr-CA.c
+++ b/tests/libedata-book/test-sqlite-cursor-move-by-fr-CA.c
@@ -20,55 +20,27 @@ main (gint argc,
        /* Ensure that the client and server get the same locale */
        g_assert (g_setenv ("EDS_COLLATE", "fr_CA.UTF-8", TRUE));
 
-       /* Try them all once in the normal base locale */
-       data = move_by_test_new ("/EbSdbCursor/fr_CA/Move/Forward", FALSE);
+       data = move_by_test_new ("/EbSdbCursor/fr_CA/Move/Forward");
        move_by_test_add_assertion (data, 5, 11, 1, 2, 5, 6);
        move_by_test_add_assertion (data, 6, 4, 3, 7, 8, 15, 17);
        move_by_test_add (data, FALSE);
 
-       data = move_by_test_new ("/EbSdbCursor/fr_CA/Move/ForwardOnNameless", FALSE);
+       data = move_by_test_new ("/EbSdbCursor/fr_CA/Move/ForwardOnNameless");
        move_by_test_add_assertion (data, 1, 11);
        move_by_test_add_assertion (data, 3, 1, 2, 5);
        move_by_test_add (data, FALSE);
 
-       data = move_by_test_new ("/EbSdbCursor/fr_CA/Move/Backwards", FALSE);
+       data = move_by_test_new ("/EbSdbCursor/fr_CA/Move/Backwards");
        move_by_test_add_assertion (data, -5, 20, 19, 9, 12, 13);
        move_by_test_add_assertion (data, -8, 14, 10, 18, 16, 17, 15, 8, 7);
        move_by_test_add (data, FALSE);
 
-       data = move_by_test_new ("/EbSdbCursor/fr_CA/Filtered/Move/Forward", FALSE);
+       data = move_by_test_new ("/EbSdbCursor/fr_CA/Filtered/Move/Forward");
        move_by_test_add_assertion (data, 5, 11, 1, 2, 5, 3);
        move_by_test_add_assertion (data, 8, 8, 17, 16, 18, 10, 14, 12, 9);
        move_by_test_add (data, TRUE);
 
-       data = move_by_test_new ("/EbSdbCursor/fr_CA/Filtered/Move/Backwards", FALSE);
-       move_by_test_add_assertion (data, -5, 9, 12, 14, 10, 18);
-       move_by_test_add_assertion (data, -8, 16, 17, 8, 3, 5, 2, 1, 11);
-       move_by_test_add (data, TRUE);
-
-
-       /* Try them all again with collation = phonebook */
-       data = move_by_test_new ("/EbSdbCursor/fr_CA collation=phonebook/Move/Forward", TRUE);
-       move_by_test_add_assertion (data, 5, 11, 1, 2, 5, 6);
-       move_by_test_add_assertion (data, 6, 4, 3, 7, 8, 15, 17);
-       move_by_test_add (data, FALSE);
-
-       data = move_by_test_new ("/EbSdbCursor/fr_CA collation=phonebook/Move/ForwardOnNameless", TRUE);
-       move_by_test_add_assertion (data, 1, 11);
-       move_by_test_add_assertion (data, 3, 1, 2, 5);
-       move_by_test_add (data, FALSE);
-
-       data = move_by_test_new ("/EbSdbCursor/fr_CA collation=phonebook/Move/Backwards", TRUE);
-       move_by_test_add_assertion (data, -5, 20, 19, 9, 12, 13);
-       move_by_test_add_assertion (data, -8, 14, 10, 18, 16, 17, 15, 8, 7);
-       move_by_test_add (data, FALSE);
-
-       data = move_by_test_new ("/EbSdbCursor/fr_CA collation=phonebook/Filtered/Move/Forward", TRUE);
-       move_by_test_add_assertion (data, 5, 11, 1, 2, 5, 3);
-       move_by_test_add_assertion (data, 8, 8, 17, 16, 18, 10, 14, 12, 9);
-       move_by_test_add (data, TRUE);
-
-       data = move_by_test_new ("/EbSdbCursor/fr_CA collation=phonebook/Filtered/Move/Backwards", TRUE);
+       data = move_by_test_new ("/EbSdbCursor/fr_CA/Filtered/Move/Backwards");
        move_by_test_add_assertion (data, -5, 9, 12, 14, 10, 18);
        move_by_test_add_assertion (data, -8, 16, 17, 8, 3, 5, 2, 1, 11);
        move_by_test_add (data, TRUE);
diff --git a/tests/libedata-book/test-sqlite-cursor-move-by-posix.c 
b/tests/libedata-book/test-sqlite-cursor-move-by-posix.c
index 5b19644..9b1365a 100644
--- a/tests/libedata-book/test-sqlite-cursor-move-by-posix.c
+++ b/tests/libedata-book/test-sqlite-cursor-move-by-posix.c
@@ -20,59 +20,30 @@ main (gint argc,
        /* Ensure that the client and server get the same locale */
        g_assert (g_setenv ("EDS_COLLATE", "POSIX", TRUE));
 
-       /* Try them all once in the normal base locale */
-       data = move_by_test_new ("/EbSdbCursor/POSIX/Move/Forward", FALSE);
+       data = move_by_test_new ("/EbSdbCursor/POSIX/Move/Forward");
        move_by_test_add_assertion (data, 5, 11, 2, 6, 3, 8);
        move_by_test_add_assertion (data, 6, 10, 19, 20, 1, 5, 4);
        move_by_test_add (data, FALSE);
 
-       data = move_by_test_new ("/EbSdbCursor/POSIX/Move/ForwardOnNameless", FALSE);
+       data = move_by_test_new ("/EbSdbCursor/POSIX/Move/ForwardOnNameless");
        move_by_test_add_assertion (data, 1, 11);
        move_by_test_add_assertion (data, 3, 2, 6, 3);
        move_by_test_add (data, FALSE);
 
-       data = move_by_test_new ("/EbSdbCursor/POSIX/Move/Backwards", FALSE);
+       data = move_by_test_new ("/EbSdbCursor/POSIX/Move/Backwards");
        move_by_test_add_assertion (data, -5, 9, 13, 12, 14, 18);
        move_by_test_add_assertion (data, -12, 16, 17, 15, 7, 4, 5, 1, 20, 19, 10, 8, 3);
        move_by_test_add (data, FALSE);
 
-       data = move_by_test_new ("/EbSdbCursor/POSIX/Filtered/Move/Forward", FALSE);
+       data = move_by_test_new ("/EbSdbCursor/POSIX/Filtered/Move/Forward");
        move_by_test_add_assertion (data, 5, 11, 2, 3, 8, 10);
        move_by_test_add_assertion (data, 8, 1, 5, 17, 16, 18, 14, 12, 9);
        move_by_test_add (data, TRUE);
 
-       data = move_by_test_new ("/EbSdbCursor/POSIX/Filtered/Move/Backwards", FALSE);
+       data = move_by_test_new ("/EbSdbCursor/POSIX/Filtered/Move/Backwards");
        move_by_test_add_assertion (data, -5, 9, 12, 14, 18, 16);
        move_by_test_add_assertion (data, -8, 17, 5, 1, 10, 8, 3, 2, 11);
        move_by_test_add (data, TRUE);
 
-
-       /* Try them all again with collation = phonebook */
-       data = move_by_test_new ("/EbSdbCursor/POSIX collation=phonebook/Move/Forward", TRUE);
-       move_by_test_add_assertion (data, 5, 11, 2, 6, 3, 8);
-       move_by_test_add_assertion (data, 6, 10, 19, 20, 1, 5, 4);
-       move_by_test_add (data, FALSE);
-
-       data = move_by_test_new ("/EbSdbCursor/POSIX collation=phonebook/Move/ForwardOnNameless", TRUE);
-       move_by_test_add_assertion (data, 1, 11);
-       move_by_test_add_assertion (data, 3, 2, 6, 3);
-       move_by_test_add (data, FALSE);
-
-       data = move_by_test_new ("/EbSdbCursor/POSIX collation=phonebook/Move/Backwards", TRUE);
-       move_by_test_add_assertion (data, -5, 9, 13, 12, 14, 18);
-       move_by_test_add_assertion (data, -12, 16, 17, 15, 7, 4, 5, 1, 20, 19, 10, 8, 3);
-       move_by_test_add (data, FALSE);
-
-       data = move_by_test_new ("/EbSdbCursor/POSIX collation=phonebook/Filtered/Move/Forward", TRUE);
-       move_by_test_add_assertion (data, 5, 11, 2, 3, 8, 10);
-       move_by_test_add_assertion (data, 8, 1, 5, 17, 16, 18, 14, 12, 9);
-       move_by_test_add (data, TRUE);
-
-       data = move_by_test_new ("/EbSdbCursor/POSIX collation=phonebook/Filtered/Move/Backwards", TRUE);
-       move_by_test_add_assertion (data, -5, 9, 12, 14, 18, 16);
-       move_by_test_add_assertion (data, -8, 17, 5, 1, 10, 8, 3, 2, 11);
-       move_by_test_add (data, TRUE);
-
-
        return e_test_server_utils_run ();
 }
diff --git a/tests/libedata-book/test-sqlite-cursor-posix-initial.c 
b/tests/libedata-book/test-sqlite-cursor-posix-initial.c
index d3ba0a4..85411ba 100644
--- a/tests/libedata-book/test-sqlite-cursor-posix-initial.c
+++ b/tests/libedata-book/test-sqlite-cursor-posix-initial.c
@@ -21,16 +21,11 @@ main (gint argc,
        g_assert (g_setenv ("EDS_COLLATE", "POSIX", TRUE));
        g_assert (g_setenv ("MIGRATION_TEST_SOURCE_NAME", "migration-test-source", TRUE));
 
-       /* When creating the addressbook, declare it with collation_type = "phonebook",
-        * note that other tests dont specify this, however the de_DE needs phonebook collation.
-        *
-        * In this way, we also assert that the SQLite introspection works properly after
-        * a migration, and the recorded SQLite collation names are used instead of the
-        * parameters when opening the addressbook.
+       /* This test actually creates the addressbook, subsequent migration tests dont
+        * recreate the contacts but rely on the addressbook to have migrated the sort keys
+        * into the new locales
         */
-       data = move_by_test_new ("/EbSdbCursor/Locale/POSIX/Initial", TRUE);
-
-       /* Assert the whole set of contacts */
+       data = move_by_test_new ("/EbSdbCursor/Locale/POSIX/Initial");
        move_by_test_add_assertion (data, 5, 11, 2,  6,  3,  8);
        move_by_test_add_assertion (data, 5, 10, 19, 20, 1,  5);
        move_by_test_add_assertion (data, 5, 4,  7,  15, 17, 16);
diff --git a/tests/libedata-book/test-sqlite-cursor-posix-migrated.c 
b/tests/libedata-book/test-sqlite-cursor-posix-migrated.c
index a6f2799..5cb6676 100644
--- a/tests/libedata-book/test-sqlite-cursor-posix-migrated.c
+++ b/tests/libedata-book/test-sqlite-cursor-posix-migrated.c
@@ -21,8 +21,7 @@ main (gint argc,
        g_assert (g_setenv ("EDS_COLLATE", "POSIX", TRUE));
        g_assert (g_setenv ("MIGRATION_TEST_SOURCE_NAME", "migration-test-source", TRUE));
 
-       /* Assert the whole set of contacts */
-       data = move_by_test_new ("/EbSdbCursor/Locale/POSIX/Migrated", FALSE);
+       data = move_by_test_new ("/EbSdbCursor/Locale/POSIX/Migrated");
        move_by_test_add_assertion (data, 5, 11, 2,  6,  3,  8);
        move_by_test_add_assertion (data, 5, 10, 19, 20, 1,  5);
        move_by_test_add_assertion (data, 5, 4,  7,  15, 17, 16);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]