summaryrefslogtreecommitdiff
path: root/test/main.c
diff options
context:
space:
mode:
authorAlbert Cervin <albert@acervin.com>2022-11-02 22:20:04 +0100
committerAlbert Cervin <albert@acervin.com>2022-11-16 23:33:49 +0100
commit2f4cb88d5c60f725323739300bb49dfa8923e7d5 (patch)
tree6ec22c2be92eff05f18e5919e747faab56e555ad /test/main.c
downloaddged-2f4cb88d5c60f725323739300bb49dfa8923e7d5.tar.gz
dged-2f4cb88d5c60f725323739300bb49dfa8923e7d5.tar.xz
dged-2f4cb88d5c60f725323739300bb49dfa8923e7d5.zip
šŸŽ‰ And so it begins
Diffstat (limited to 'test/main.c')
-rw-r--r--test/main.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/main.c b/test/main.c
new file mode 100644
index 0000000..f124f0c
--- /dev/null
+++ b/test/main.c
@@ -0,0 +1,24 @@
+#include <locale.h>
+#include <signal.h>
+#include <stdlib.h>
+
+#include "test.h"
+
+void handle_abort() { exit(1); }
+
+int main() {
+ setlocale(LC_ALL, "");
+ signal(SIGABRT, handle_abort);
+
+ printf("\nšŸŒ \x1b[1;36mRunning utf8 tests...\x1b[0m\n");
+ run_utf8_tests();
+
+ printf("\nšŸ“œ \x1b[1;36mRunning text tests...\x1b[0m\n");
+ run_text_tests();
+
+ printf("\nšŸ•“ļø \x1b[1;36mRunning buffer tests...\x1b[0m\n");
+ run_buffer_tests();
+
+ printf("\nšŸŽ‰ \x1b[1;32mDone! All tests successful!\x1b[0m\n");
+ return 0;
+}