about summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-01-28 21:51:43 +0000
committerJames Booth <boothj5@gmail.com>2014-01-28 21:51:43 +0000
commit788fc48b1de1152390a7fe3284a7818fba805448 (patch)
tree5f584b1375e4948de474d497029c4092098684b1 /tests
parentc3ea8f8d0bc3a8e4f5660a76e3988847e18de824 (diff)
downloadprofani-tty-788fc48b1de1152390a7fe3284a7818fba805448.tar.gz
Fixed double free'ing in tests
Diffstat (limited to 'tests')
-rw-r--r--tests/test_cmd_alias.c2
-rw-r--r--tests/test_contact.c4
-rw-r--r--tests/testsuite.c14
3 files changed, 10 insertions, 10 deletions
diff --git a/tests/test_cmd_alias.c b/tests/test_cmd_alias.c
index 27fd806b..8666b1aa 100644
--- a/tests/test_cmd_alias.c
+++ b/tests/test_cmd_alias.c
@@ -105,7 +105,7 @@ void cmd_alias_add_shows_message_when_exists(void **state)
     prefs_add_alias("hc", "/help commands");
     cmd_autocomplete_add("/hc");
 
-    expect_cons_show("Command or alias /hc already exists.");
+    expect_cons_show("Command or alias '/hc' already exists.");
 
     gboolean result = cmd_alias(args, *help);
     assert_true(result);
diff --git a/tests/test_contact.c b/tests/test_contact.c
index 5bc84a38..88dd63c2 100644
--- a/tests/test_contact.c
+++ b/tests/test_contact.c
@@ -20,7 +20,7 @@ void contact_in_group(void **state)
     assert_true(result);
 
     p_contact_free(contact);
-    g_slist_free(groups);
+//    g_slist_free(groups);
 }
 
 void contact_not_in_group(void **state)
@@ -35,7 +35,7 @@ void contact_not_in_group(void **state)
     assert_false(result);
 
     p_contact_free(contact);
-    g_slist_free(groups);
+//    g_slist_free(groups);
 }
 
 void contact_name_when_name_exists(void **state)
diff --git a/tests/testsuite.c b/tests/testsuite.c
index 70ca89de..ebaff386 100644
--- a/tests/testsuite.c
+++ b/tests/testsuite.c
@@ -386,9 +386,9 @@ int main(int argc, char* argv[]) {
         unit_test_setup_teardown(console_doesnt_show_dnd_presence_when_set_online,
             create_config_file,
             delete_config_file),
-//        unit_test_setup_teardown(console_shows_dnd_presence_when_set_all,
-//            create_config_file,
-//            delete_config_file),
+        unit_test_setup_teardown(console_shows_dnd_presence_when_set_all,
+            create_config_file,
+            delete_config_file),
     };
 
     const UnitTest cmd_alias_tests[] = {
@@ -399,9 +399,9 @@ int main(int argc, char* argv[]) {
         unit_test_setup_teardown(cmd_alias_add_adds_alias,
             create_config_file,
             delete_config_file),
-//        unit_test_setup_teardown(cmd_alias_add_shows_message_when_exists,
-//            create_config_file,
-//            delete_config_file),
+        unit_test_setup_teardown(cmd_alias_add_shows_message_when_exists,
+            create_config_file,
+            delete_config_file),
         unit_test_setup_teardown(cmd_alias_remove_removes_alias,
             create_config_file,
             delete_config_file),
@@ -413,7 +413,6 @@ int main(int argc, char* argv[]) {
             delete_config_file),
     };
 
-
     int bak, new;
     fflush(stdout);
     bak = dup(1);
@@ -442,6 +441,7 @@ int main(int argc, char* argv[]) {
     fflush(stdout);
     dup2(bak, 1);
     close(bak);
+
     if (result > 0) {
         return 1;
     } else {