empathy r1576 - trunk/tests



Author: xclaesse
Date: Mon Oct 13 07:55:33 2008
New Revision: 1576
URL: http://svn.gnome.org/viewvc/empathy?rev=1576&view=rev

Log:
check-empathy-chatroom-manager.c: check the result of system()

Modified:
   trunk/tests/check-empathy-chatroom-manager.c

Modified: trunk/tests/check-empathy-chatroom-manager.c
==============================================================================
--- trunk/tests/check-empathy-chatroom-manager.c	(original)
+++ trunk/tests/check-empathy-chatroom-manager.c	Mon Oct 13 07:55:33 2008
@@ -100,7 +100,13 @@
   /* change the chatrooms XML file to use the account we just created */
   cmd = g_strdup_printf ("sed -i 's/CHANGE_ME/%s/' %s",
       mc_account_get_unique_name (account), file);
-  system (cmd);
+
+  if (system (cmd) == -1)
+    {
+      g_print ("system call failed\n");
+      return;
+    }
+
   g_free (cmd);
 
   mgr = empathy_chatroom_manager_new (file);



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