]> git.0d.be Git - empathy.git/commitdiff
check-empathy-chatroom-manager.c: check the result of system()
authorXavier Claessens <xclaesse@src.gnome.org>
Mon, 13 Oct 2008 07:55:33 +0000 (07:55 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Mon, 13 Oct 2008 07:55:33 +0000 (07:55 +0000)
svn path=/trunk/; revision=1576

tests/check-empathy-chatroom-manager.c

index 73f164b15597f25e3bb726c147904bceeac35a5b..f8fa8127c56433da2b70a5999f367ae4fd701e63 100644 (file)
@@ -100,7 +100,13 @@ START_TEST (test_empathy_chatroom_manager_new)
   /* 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);