Test for /otr theirfp in non OTR window

This commit is contained in:
James Booth
2014-02-17 22:57:36 +00:00
parent a25714b6dc
commit b4b463998b
5 changed files with 34 additions and 0 deletions

View File

@@ -181,6 +181,12 @@ void _mock_ui_current_print_line(const char * const msg, ...)
va_end(args);
}
static
gboolean _mock_ui_current_win_is_otr(void)
{
return (gboolean)mock();
}
// bind mocks and stubs
void
@@ -416,3 +422,10 @@ ui_current_print_line_expect(char *message)
{
expect_string(_mock_ui_current_print_line, output, message);
}
void
ui_current_win_is_otr_returns(gboolean result)
{
ui_current_win_is_otr = _mock_ui_current_win_is_otr;
will_return(_mock_ui_current_win_is_otr, result);
}

View File

@@ -57,4 +57,6 @@ void ui_current_print_formatted_line_expect(char show_char, int attrs, char *mes
void mock_ui_current_print_line(void);
void ui_current_print_line_expect(char *message);
void ui_current_win_is_otr_returns(gboolean result);
#endif