[evolution-data-server/openismus-work] test-server-utils: Permit custom source names



commit 238dfac99c0dbde632e63223a7a3cc1feb9dd717
Author: Mathias Hasselmann <mathias openismus com>
Date:   Thu Feb 28 20:44:28 2013 +0100

    test-server-utils: Permit custom source names
    
    This is needed for testing behavior after reopening a source.

 tests/test-server-utils/e-test-server-utils.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/tests/test-server-utils/e-test-server-utils.c b/tests/test-server-utils/e-test-server-utils.c
index 4f8bf08..9593080 100644
--- a/tests/test-server-utils/e-test-server-utils.c
+++ b/tests/test-server-utils/e-test-server-utils.c
@@ -214,7 +214,8 @@ e_test_server_utils_bootstrap_idle (FixturePair *pair)
        case E_TEST_SERVER_DIRECT_ADDRESS_BOOK:
        case E_TEST_SERVER_DEPRECATED_ADDRESS_BOOK:
 
-               pair->fixture->source_name = g_strdup_printf ("%s-%d", ADDRESS_BOOK_SOURCE_UID, 
global_test_source_id++);
+               if (!pair->fixture->source_name)
+                       pair->fixture->source_name = g_strdup_printf ("%s-%d", ADDRESS_BOOK_SOURCE_UID, 
global_test_source_id++);
 
                scratch = e_source_new_with_uid (pair->fixture->source_name, NULL, &error);
                if (!scratch)
@@ -228,7 +229,8 @@ e_test_server_utils_bootstrap_idle (FixturePair *pair)
        case E_TEST_SERVER_CALENDAR:
        case E_TEST_SERVER_DEPRECATED_CALENDAR:
 
-               pair->fixture->source_name = g_strdup_printf ("%s-%d", CALENDAR_SOURCE_UID, 
global_test_source_id++);
+               if (!pair->fixture->source_name)
+                       pair->fixture->source_name = g_strdup_printf ("%s-%d", CALENDAR_SOURCE_UID, 
global_test_source_id++);
 
                scratch = e_source_new_with_uid (pair->fixture->source_name, NULL, &error);
                if (!scratch)


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