8 #include <cgreen/cgreen.h>
9 #include <cgreen/mocks.h>
42 Ensure (attack, comm_send_status_returns_neg1_for_null_args)
55 Ensure (attack, comm_send_status_error_if_hostname_too_big)
65 long_host = g_malloc (2049);
66 for (index = 0; index < 2049; index++)
67 long_host[index] =
'a';
68 long_host[2048] =
'\0';
76 Ensure (attack, comm_send_status_sends_correct_text)
79 struct kb_operations kb_ops_struct;
89 kb->kb_ops = &kb_ops_struct;
95 assert_that (strcmp (
given_name,
"internal/status"), is_equal_to (0));
96 assert_that (strcmp (
given_value,
"127.0.0.1/11/67"), is_equal_to (0));
107 suite = create_test_suite ();
109 add_test_with_context (suite, attack,
110 comm_send_status_returns_neg1_for_null_args);
111 add_test_with_context (suite, attack,
112 comm_send_status_error_if_hostname_too_big);
113 add_test_with_context (suite, attack, comm_send_status_sends_correct_text);
116 return run_single_test (suite, argv[1], create_text_reporter ());
118 return run_test_suite (suite, create_text_reporter ());