Line data Source code
1 : #include <stdio.h>
2 : #include <stdlib.h>
3 : #include "test_helpers.h"
4 : #include "logger.h"
5 :
6 : // Globals defined in test_helpers.h
7 : int g_tests_run = 0;
8 : int g_tests_failed = 0;
9 :
10 : // Forward declarations of test suites
11 : void test_fs_util(void);
12 : void test_config_store(void);
13 : void test_logger(void);
14 : void test_wizard(void);
15 : void test_imap_client(void);
16 : void test_mime_util(void);
17 : void test_local_msg_store(void);
18 : void test_local_hdr_evict(void);
19 : void test_local_index(void);
20 : void test_manifest(void);
21 : void test_ui_prefs(void);
22 : void test_imap_util(void);
23 : void test_platform(void);
24 : void test_email_service(void);
25 : void test_html_parser(void);
26 : void test_html_render(void);
27 : void test_html_render_style_balance(void);
28 : void test_html_render_parent_close(void);
29 : void test_html_render_color_filter(void);
30 : void test_html_render_url_isolation(void);
31 : void test_input_line(void);
32 : void test_path_complete(void);
33 :
34 1 : int main() {
35 1 : printf("--- email-cli Unit Test Suite ---\n\n");
36 :
37 : // Suppress mirror of ERROR logs to stderr during testing
38 1 : logger_set_stderr(0);
39 :
40 1 : RUN_TEST(test_fs_util);
41 1 : RUN_TEST(test_config_store);
42 1 : RUN_TEST(test_logger);
43 1 : RUN_TEST(test_wizard);
44 1 : RUN_TEST(test_imap_client);
45 1 : RUN_TEST(test_mime_util);
46 1 : RUN_TEST(test_local_msg_store);
47 1 : RUN_TEST(test_local_hdr_evict);
48 1 : RUN_TEST(test_local_index);
49 1 : RUN_TEST(test_manifest);
50 1 : RUN_TEST(test_ui_prefs);
51 1 : RUN_TEST(test_imap_util);
52 1 : RUN_TEST(test_platform);
53 1 : RUN_TEST(test_email_service);
54 1 : RUN_TEST(test_html_parser);
55 1 : RUN_TEST(test_html_render);
56 1 : RUN_TEST(test_html_render_style_balance);
57 1 : RUN_TEST(test_html_render_parent_close);
58 1 : RUN_TEST(test_html_render_color_filter);
59 1 : RUN_TEST(test_html_render_url_isolation);
60 1 : RUN_TEST(test_input_line);
61 1 : RUN_TEST(test_path_complete);
62 :
63 1 : printf("\n--- Test Results ---\n");
64 1 : printf("Tests Run: %d\n", g_tests_run);
65 1 : printf("Tests Passed: %d\n", g_tests_run - g_tests_failed);
66 1 : printf("Tests Failed: %d\n", g_tests_failed);
67 :
68 1 : if (g_tests_failed > 0) {
69 0 : return EXIT_FAILURE;
70 : }
71 1 : return EXIT_SUCCESS;
72 : }
|