From 1e61cd1da6f9f0a27f7e983b0da6ab9301539ebd Mon Sep 17 00:00:00 2001 From: Jason Peters Date: Wed, 31 Jan 2024 15:24:33 +0100 Subject: [PATCH] =?UTF-8?q?Test=20f=C3=BCr=20Zeilenumbr=C3=BCche=20hinzuge?= =?UTF-8?q?f=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test/c/Jason/test_ASCII_art.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/test/c/Jason/test_ASCII_art.c b/src/test/c/Jason/test_ASCII_art.c index 276e667..fb2d6c9 100644 --- a/src/test/c/Jason/test_ASCII_art.c +++ b/src/test/c/Jason/test_ASCII_art.c @@ -65,6 +65,21 @@ void test_stringAbgleichMitLeerzeichen(void){ befuelleArrayMitLeerzeichen(message, 18); + // assert + TEST_ASSERT_EQUAL_STRING(expectedMessage, message); +} + +void test_stringAbgleichMitLeerzeichenUndZeilenumbruch(void){ + // arrange + char expectedMessage[] = "X X X\nX X X\nX X X"; + + // act + char message[19]; + befuellenDesArraysMitX(message, 18); + befuelleArrayMitLeerzeichen(message, 18); + befuelleArrayMitZeilenumbruechen(message, 3); + + // assert TEST_ASSERT_EQUAL_STRING(expectedMessage, message); } \ No newline at end of file