From 6104c0ee7257ae99e5187f56593442ca9f04084b Mon Sep 17 00:00:00 2001 From: Oskar Date: Sun, 31 Mar 2024 21:30:11 +0200 Subject: Started integrating the input system. Mainly trying to integrate the 'singles' so far because they will be the easiest. --- test/oldtests/validate_check_p_m.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 test/oldtests/validate_check_p_m.c (limited to 'test/oldtests/validate_check_p_m.c') diff --git a/test/oldtests/validate_check_p_m.c b/test/oldtests/validate_check_p_m.c new file mode 100644 index 0000000..fe54bd9 --- /dev/null +++ b/test/oldtests/validate_check_p_m.c @@ -0,0 +1,37 @@ +#include +#include +#include +#include +#include +#include "../7ed.h" +#include "../i_validation.h" +#include "../input.h" +#include + +// Test for validate_check_p_m + +int main () { + uint64_t focus = 1; + char smode_buf[SMODE_MAX_SIZE]; // Smode buffer + fprintf(stdout, "(%lu): ", focus); // UI + fgets(smode_buf, SMODE_MAX_SIZE, stdin); // Read user input + + int ret = validate_check_p_m(smode_buf); + + if(ret == _NA) { + printf("NA\n"); + } + if(ret == _PLUS_CONTINUE) { + printf("plus continue\n"); + } + + if(ret == _INVALID) { + printf("?\n"); + } + if(ret == _VALID) { + printf("valid\n"); + } + + return 0; + +} \ No newline at end of file -- cgit v1.2.3