[next] telepathy-glib: fix account unescape tests

Guillaume Desmottes gdesmott at kemper.freedesktop.org
Tue Oct 29 11:53:14 CET 2013


Module: telepathy-glib
Branch: next
Commit: 5cdda0cb2d1d942073de19fb88d7fb1ecf820b59
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=5cdda0cb2d1d942073de19fb88d7fb1ecf820b59

Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Tue Oct 29 11:44:23 2013 +0100

fix account unescape tests

3d61bc4e42e672b43465402843876f4c67f45438 was incomplete as it didn't update
the tests and didn't remove the '-' when unescaping '_2d'.

---

 telepathy-glib/account.c |    2 +-
 tests/dbus/account.c     |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/telepathy-glib/account.c b/telepathy-glib/account.c
index 5bfe6ea..21bfd2d 100644
--- a/telepathy-glib/account.c
+++ b/telepathy-glib/account.c
@@ -2193,7 +2193,7 @@ unescape_protocol (gchar *protocol)
        * forever.
        */
       gchar **chunks = g_strsplit (protocol, "_2d", 0);
-      gchar *new = g_strjoinv ("-", chunks);
+      gchar *new = g_strjoinv ("_", chunks);
 
       g_strfreev (chunks);
       g_free (protocol);
diff --git a/tests/dbus/account.c b/tests/dbus/account.c
index 8c6f91f..ce5d1f0 100644
--- a/tests/dbus/account.c
+++ b/tests/dbus/account.c
@@ -925,17 +925,17 @@ main (int argc,
   g_test_add_data_func ("/account/parse/hyphenated-protocol",
       test_parse_data_new (
           TP_ACCOUNT_OBJECT_PATH_BASE "salut/local_xmpp/badgers",
-          "salut", "local-xmpp", "badgers"),
+          "salut", "local_xmpp", "badgers"),
       test_parse_success);
   g_test_add_data_func ("/account/parse/wrongly-escaped-protocol",
       test_parse_data_new (
           TP_ACCOUNT_OBJECT_PATH_BASE "salut/local_2dxmpp/badgers",
-          "salut", "local-xmpp", "badgers"),
+          "salut", "local_xmpp", "badgers"),
       test_parse_success);
   g_test_add_data_func ("/account/parse/wrongly-escaped-corner-case",
       test_parse_data_new (
           TP_ACCOUNT_OBJECT_PATH_BASE "salut/local_2d/badgers",
-          "salut", "local-", "badgers"),
+          "salut", "local_", "badgers"),
       test_parse_success);
   g_test_add_data_func ("/account/parse/underscored-account",
       test_parse_data_new (



More information about the telepathy-commits mailing list