about summary refs log tree commit diff stats
path: root/test_contact_list.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2012-03-10 22:32:07 +0000
committerJames Booth <boothj5@gmail.com>2012-03-10 22:32:07 +0000
commitf928fb36250bab2ad5829a07a04b7ecde47f728c (patch)
treeb2d49e4becb52430f01e012db721df085e18fe56 /test_contact_list.c
parentf23f768d5451f540b05321af575e8fcf094738a0 (diff)
downloadprofani-tty-f928fb36250bab2ad5829a07a04b7ecde47f728c.tar.gz
Started autocomplete contact
Currently autocompletes first match
Diffstat (limited to 'test_contact_list.c')
-rw-r--r--test_contact_list.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test_contact_list.c b/test_contact_list.c
index 8c205faf..92972651 100644
--- a/test_contact_list.c
+++ b/test_contact_list.c
@@ -353,6 +353,12 @@ static void find_returns_null(void)
     assert_is_null(result);
 }
 
+static void find_on_empty_returns_null(void)
+{
+    char *result = find_contact("James");
+    assert_is_null(result);
+}
+
 void register_contact_list_tests(void)
 {
     TEST_MODULE("contact_list tests");
@@ -387,4 +393,5 @@ void register_contact_list_tests(void)
     TEST(find_second_exists);
     TEST(find_third_exists);
     TEST(find_returns_null);
+    TEST(find_on_empty_returns_null);
 }