summaryrefslogtreecommitdiff
path: root/test/validate_check_p_m.c
diff options
context:
space:
mode:
authorOskar <>2024-03-22 08:40:20 +0100
committerOskar <>2024-03-22 08:40:20 +0100
commit614e11f52560aaff75e7cd047b38a167fe3c0dcd (patch)
treeebdede605db779f57441e2074a1d9c191ecb4bc8 /test/validate_check_p_m.c
parent55ca0a4f7dd66383c4455784d6a117adbd94babe (diff)
Created tests. Will create more testcases later.
Diffstat (limited to 'test/validate_check_p_m.c')
-rw-r--r--test/validate_check_p_m.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/validate_check_p_m.c b/test/validate_check_p_m.c
new file mode 100644
index 0000000..2af38df
--- /dev/null
+++ b/test/validate_check_p_m.c
@@ -0,0 +1,28 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+#include "7ed.h"
+#include "i_validation.h"
+#include "input.h"
+#include <stdint.h>
+
+// 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 == _INVALID) {
+ printf("?\n");
+ }
+ if(ret == _VALID) {
+ printf("valid\n");
+ }
+
+} \ No newline at end of file