Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions tests/src/kb_cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
8 changes: 6 additions & 2 deletions tests/src/test_kb_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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(),
Expand Down