diff --git a/test/test_userinput.c b/test/test_userinput.c index dbfca67..4965bab 100644 --- a/test/test_userinput.c +++ b/test/test_userinput.c @@ -31,6 +31,13 @@ void test_gets_WithMax(void) { TEST_ASSERT_EQUAL_CHAR_ARRAY("dddd", actual, strlen(actual)); } +void test_gets_WithAnyLength(void) { + char *input[] = {"dfdfdfdf", NULL}; + fakeInput = input; + char *actual = gets("", NULL, NULL); + TEST_ASSERT_EQUAL_CHAR_ARRAY("dfdfdfdf", actual, strlen(actual)); +} + void test_gethd_WithMinAndMax(void) { short min = 10; short max = 100;