summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOskar <>2024-03-22 13:25:56 +0100
committerOskar <>2024-03-22 13:25:56 +0100
commit55ac4ebe3bed9b112fa553abece277b309c76bb9 (patch)
treeec8c922f7ddf85d1561f3411d7be79c43cd7f02b
parent45a12e60a3c13203939626b8c70b76b387a73396 (diff)
updated test/Makefile for easier testing
-rw-r--r--i_validation.h2
-rw-r--r--test/Makefile15
-rw-r--r--test/validate_check_imm.c6
-rw-r--r--test/validate_check_p_m.c6
-rw-r--r--test/validate_plus_continue_tests.c6
5 files changed, 25 insertions, 10 deletions
diff --git a/i_validation.h b/i_validation.h
index a1ee328..760f857 100644
--- a/i_validation.h
+++ b/i_validation.h
@@ -14,7 +14,7 @@
#define _CONTINUE 6
#define _NA 7
-int validate_check_p_m(char *smode_buf)
+int validate_check_p_m(char *smode_buf);
int validate_check_imm(char *smode_buf);
diff --git a/test/Makefile b/test/Makefile
index 252e0a1..3bdbc68 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -7,8 +7,23 @@ all: 7ed-TESTING
clean:
cd .. && make clean
+ rm -f vcpm
+ echo "rm -f vcpm"
+ rm -f vcimm
+ echo "rm -f vcpm"
+ rm -f vpct
+ echo "rm -f vcpm"
echo "Cleaned."
smode:
echo "CC input.c ---> smode"
cd .. && gcc -Wfatal-errors -Wall -Werror -Wextra -g -fsanitize=address input.c i_validation.c -o test/smode
+
+alltests:
+ cd .. && make tests
+ gcc validate_check_p_m.c ../i_validation.c -o vcpm
+ echo "CC ---> vcpm"
+ gcc validate_check_imm.c ../i_validation.c -o vcimm
+ echo "CC ---> vcimm"
+ gcc validate_plus_continue_tests.c ../i_validation.c -o vpct
+ echo "CC ---> vpct" \ No newline at end of file
diff --git a/test/validate_check_imm.c b/test/validate_check_imm.c
index a4d3132..b350e68 100644
--- a/test/validate_check_imm.c
+++ b/test/validate_check_imm.c
@@ -3,9 +3,9 @@
#include <unistd.h>
#include <string.h>
#include <errno.h>
-#include "7ed.h"
-#include "i_validation.h"
-#include "input.h"
+#include "../7ed.h"
+#include "../i_validation.h"
+#include "../input.h"
#include <stdint.h>
// Test for validate_check_imm
diff --git a/test/validate_check_p_m.c b/test/validate_check_p_m.c
index 2af38df..8809f9a 100644
--- a/test/validate_check_p_m.c
+++ b/test/validate_check_p_m.c
@@ -3,9 +3,9 @@
#include <unistd.h>
#include <string.h>
#include <errno.h>
-#include "7ed.h"
-#include "i_validation.h"
-#include "input.h"
+#include "../7ed.h"
+#include "../i_validation.h"
+#include "../input.h"
#include <stdint.h>
// Test for validate_check_p_m
diff --git a/test/validate_plus_continue_tests.c b/test/validate_plus_continue_tests.c
index 67e687a..6817203 100644
--- a/test/validate_plus_continue_tests.c
+++ b/test/validate_plus_continue_tests.c
@@ -3,9 +3,9 @@
#include <unistd.h>
#include <string.h>
#include <errno.h>
-#include "7ed.h"
-#include "i_validation.h"
-#include "input.h"
+#include "../7ed.h"
+#include "../i_validation.h"
+#include "../input.h"
#include <stdint.h>
// Test for validate_plus_continue