about summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorMarcoPolo-PasTonMolo <marcopolopastonmolo@protonmail.com>2022-03-21 00:10:07 +0200
committerMarcoPolo-PasTonMolo <marcopolopastonmolo@protonmail.com>2022-03-21 13:46:50 +0200
commit06ef6842e8ff6b7a754c54f4af39775bc842612b (patch)
treeb811ac7e13551c8ca9fbfc072a2e7a5fc37acf34 /tests
parent09e7f63c790089acfe1fd39f686597891cada5a7 (diff)
downloadprofani-tty-06ef6842e8ff6b7a754c54f4af39775bc842612b.tar.gz
Add quote autocompletion for previous messages
Fixes https://github.com/profanity-im/profanity/issues/1649

Type `>` then press tab or shift tab to autocomplete previous messages,
then type your reply and send message.
Newlines are replaced with newline followed by `> `.
A newline is added at the end so that the user can immediately type a
message without manually adding a new line.
Diffstat (limited to 'tests')
-rw-r--r--tests/unittests/test_cmd_otr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/unittests/test_cmd_otr.c b/tests/unittests/test_cmd_otr.c
index 0aca077c..7dcc1767 100644
--- a/tests/unittests/test_cmd_otr.c
+++ b/tests/unittests/test_cmd_otr.c
@@ -271,6 +271,7 @@ test_cmd_otr_theirfp_from_wintype(win_type_t wintype)
     window.type = wintype;
     window.layout = NULL;
     window.urls_ac = NULL;
+    window.quotes_ac = NULL;
 
     will_return(connection_get_status, JABBER_CONNECTED);
 
@@ -308,6 +309,7 @@ cmd_otr_theirfp_shows_message_when_non_otr_chat_window(void** state)
     window.type = WIN_CHAT;
     window.layout = NULL;
     window.urls_ac = NULL;
+    window.quotes_ac = NULL;
     ProfChatWin chatwin;
     chatwin.window = window;
     chatwin.memcheck = PROFCHATWIN_MEMCHECK;
@@ -337,6 +339,7 @@ cmd_otr_theirfp_shows_fingerprint(void** state)
     window.type = WIN_CHAT;
     window.layout = NULL;
     window.urls_ac = NULL;
+    window.quotes_ac = NULL;
     ProfChatWin chatwin;
     chatwin.window = window;
     chatwin.barejid = recipient;
@@ -365,6 +368,7 @@ test_cmd_otr_start_from_wintype(win_type_t wintype)
     window.type = wintype;
     window.layout = NULL;
     window.urls_ac = NULL;
+    window.quotes_ac = NULL;
 
     will_return(connection_get_status, JABBER_CONNECTED);
 
@@ -404,6 +408,7 @@ cmd_otr_start_shows_message_when_already_started(void** state)
     window.type = WIN_CHAT;
     window.layout = NULL;
     window.urls_ac = NULL;
+    window.quotes_ac = NULL;
     ProfChatWin chatwin;
     chatwin.window = window;
     chatwin.barejid = recipient;
@@ -430,6 +435,7 @@ cmd_otr_start_shows_message_when_no_key(void** state)
     window.type = WIN_CHAT;
     window.layout = NULL;
     window.urls_ac = NULL;
+    window.quotes_ac = NULL;
     ProfChatWin chatwin;
     chatwin.window = window;
     chatwin.barejid = recipient;
@@ -454,6 +460,7 @@ cmd_otr_start_sends_otr_query_message_to_current_recipeint(void** state)
     window.type = WIN_CHAT;
     window.layout = NULL;
     window.urls_ac = NULL;
+    window.quotes_ac = NULL;
     ProfChatWin chatwin;
     chatwin.window = window;
     chatwin.barejid = recipient;