diff --git a/test/test_userinput.c b/test/test_userinput.c index d2129ea..dbfca67 100644 --- a/test/test_userinput.c +++ b/test/test_userinput.c @@ -23,6 +23,14 @@ void test_gets_WithMin(void) { TEST_ASSERT_EQUAL_CHAR_ARRAY("dddd", actual, strlen(actual)); } +void test_gets_WithMax(void) { + unsigned long maxLength = 6; + char *input[] = {"dfdfdfdf", "dddd", NULL}; + fakeInput = input; + char *actual = gets("", NULL, &maxLength); + TEST_ASSERT_EQUAL_CHAR_ARRAY("dddd", actual, strlen(actual)); +} + void test_gethd_WithMinAndMax(void) { short min = 10; short max = 100;