22 #include <cgreen/cgreen.h>
23 #include <cgreen/mocks.h>
48 Ensure (attack, comm_send_status_returns_neg1_for_null_args)
61 Ensure (attack, comm_send_status_error_if_hostname_too_big)
71 long_host = g_malloc (2049);
72 for (index = 0; index < 2049; index++)
73 long_host[index] =
'a';
74 long_host[2048] =
'\0';
82 Ensure (attack, comm_send_status_sends_correct_text)
85 struct kb_operations kb_ops_struct;
94 kb->kb_ops = &kb_ops_struct;
98 assert_that (strcmp (
given_name,
"internal/status"), is_equal_to (0));
99 assert_that (strcmp (
given_value,
"11/67"), is_equal_to (0));
110 suite = create_test_suite ();
112 add_test_with_context (suite, attack,
113 comm_send_status_returns_neg1_for_null_args);
114 add_test_with_context (suite, attack,
115 comm_send_status_error_if_hostname_too_big);
116 add_test_with_context (suite, attack, comm_send_status_sends_correct_text);
119 return run_single_test (suite, argv[1], create_text_reporter ());
121 return run_test_suite (suite, create_text_reporter ());