mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-05-20 17:07:32 +08:00
Add test for C string escape sequences
This commit is contained in:
@ -2275,6 +2275,14 @@ void testFailureCountIncrementsAndIsReturnedAtEnd(void)
|
||||
TEST_ASSERT_EQUAL(1, failures);
|
||||
}
|
||||
|
||||
void testCstringsEscapeSequence(void)
|
||||
{
|
||||
startPutcharSpy();
|
||||
UnityPrint("\x16\x10");
|
||||
endPutcharSpy();
|
||||
TEST_ASSERT_EQUAL_STRING("\\x16\\x10", getBufferPutcharSpy());
|
||||
}
|
||||
|
||||
#define TEST_ASSERT_EQUAL_PRINT_NUMBERS(expected, actual) { \
|
||||
startPutcharSpy(); UnityPrintNumber((actual)); endPutcharSpy(); \
|
||||
TEST_ASSERT_EQUAL_STRING((expected), getBufferPutcharSpy()); \
|
||||
|
Reference in New Issue
Block a user