From 3818ce2f548669dc16754fe89d7b412bc54b9d35 Mon Sep 17 00:00:00 2001 From: Real-Septicake Date: Tue, 11 Feb 2025 18:19:52 -0500 Subject: [PATCH 1/2] Actually run the tests for word typing --- tests/src/test_kb_cmd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/src/test_kb_cmd.c b/tests/src/test_kb_cmd.c index 1a666fc..a90ecf0 100644 --- a/tests/src/test_kb_cmd.c +++ b/tests/src/test_kb_cmd.c @@ -94,12 +94,12 @@ int shiftTest() { // Word type testing int wordTest() { - ASSERT(strncmp("test", buff, 5)) + ASSERT(strncmp("test", buff, 5) == 0) return 0; } int complexWordTest() { - ASSERT(strncmp("This is a very Loong word$%@^@\\", buff, 32)) + ASSERT(strncmp("This is a very Loong word$%@^@\\", buff, 32) == 0) return 0; } @@ -133,10 +133,14 @@ void test_main() { // Word type test funcCMD(wordTestStart), typeWordCMD("test"), + funcCMD(wordTest), funcCMD(wordTestEnd), + funcCMD(resetBuff), + funcCMD(complexWordTestStart), typeWordCMD("This is a very Loong word$%@^@\\"), + funcCMD(complexWordTest), funcCMD(complexWordTestEnd), endCMD(), From f715c5606155f303b9e75ad5f23b5b3d4f0b13c9 Mon Sep 17 00:00:00 2001 From: Real-Septicake Date: Tue, 11 Feb 2025 18:30:17 -0500 Subject: [PATCH 2/2] Comment out problematic function --- tests/src/kb_cmd.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/src/kb_cmd.h b/tests/src/kb_cmd.h index 37c7ea1..ac9a6ac 100644 --- a/tests/src/kb_cmd.h +++ b/tests/src/kb_cmd.h @@ -171,9 +171,10 @@ static struct KbCmd endCMD() { typedef void (*KeyPressHandler)(struct PS2Buf_t); typedef int (*ExecFunc)(struct KbCmd, int *, KeyPressHandler); -static void baseKeyHandler(struct PS2Buf_t kb) { - vgaEditor(kb); -} +// Commented out to avoid gcc complaining about it being unused +// static void baseKeyHandler(struct PS2Buf_t kb) { +// vgaEditor(kb); +// } static int baseExec(struct KbCmd cmd, int *idx, KeyPressHandler kp) { switch (cmd.cmd) {