fix #15 added an api to control mode and echo + fixed the implementation and added tests

This commit is contained in:
prozessorkern
2020-03-08 19:56:04 +01:00
parent e970b6c941
commit 2921f9791b
7 changed files with 164 additions and 30 deletions

View File

@@ -61,7 +61,7 @@ TEST_CASE( "shellmatta_insertChars overwrite" ) {
utils_insertChars(&inst, (char*)"blksdflsd kfjlk", 4u);
CHECK( inst.cursor == 12);
CHECK( inst.inputCount == 14);
CHECK( inst.inputCount == 12);
CHECK( write_callCnt == 1u );
CHECK( strncmp("blks", write_data, 5u) == 0);
REQUIRE( strncmp("abcdefghblks\0\0\0\0\0\0\0\0\0", buffer, sizeof(buffer)) == 0);