mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-24 02:26:22 +00:00
Added test for /otr theirfp when in console
This commit is contained in:
@@ -171,6 +171,16 @@ void _mock_ui_current_print_formatted_line(const char show_char, int attrs, cons
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
static
|
||||
void _mock_ui_current_print_line(const char * const msg, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, msg);
|
||||
vsnprintf(output, sizeof(output), msg, args);
|
||||
check_expected(output);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
// bind mocks and stubs
|
||||
|
||||
void
|
||||
@@ -270,6 +280,12 @@ mock_ui_current_print_formatted_line(void)
|
||||
ui_current_print_formatted_line = _mock_ui_current_print_formatted_line;
|
||||
}
|
||||
|
||||
void
|
||||
mock_ui_current_print_line(void)
|
||||
{
|
||||
ui_current_print_line = _mock_ui_current_print_line;
|
||||
}
|
||||
|
||||
// expectations
|
||||
|
||||
void
|
||||
@@ -394,3 +410,9 @@ ui_current_print_formatted_line_expect(char show_char, int attrs, char *message)
|
||||
expect_value(_mock_ui_current_print_formatted_line, attrs, attrs);
|
||||
expect_string(_mock_ui_current_print_formatted_line, output, message);
|
||||
}
|
||||
|
||||
void
|
||||
ui_current_print_line_expect(char *message)
|
||||
{
|
||||
expect_string(_mock_ui_current_print_line, output, message);
|
||||
}
|
||||
|
||||
@@ -54,4 +54,7 @@ void stub_ui_current_refresh(void);
|
||||
void mock_ui_current_print_formatted_line(void);
|
||||
void ui_current_print_formatted_line_expect(char show_char, int attrs, char *message);
|
||||
|
||||
void mock_ui_current_print_line(void);
|
||||
void ui_current_print_line_expect(char *message);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user