diff --git a/src/commands.c b/src/commands.c index f9f92fb..61f04be 100644 --- a/src/commands.c +++ b/src/commands.c @@ -385,9 +385,12 @@ void commands_dispatch(client_t *client) { while (*inbox_arg == ' ') inbox_arg++; if (strcmp(inbox_arg, "clear") == 0) { clear_inbox(client); + output_kind = TNT_COMMAND_OUTPUT_INBOX; buffer_appendf(output, sizeof(output), &pos, "%s", i18n_text(client->ui_lang, I18N_INBOX_CLEARED)); + buffer_appendf(output, sizeof(output), &pos, "\n"); + append_inbox_output(client, output, sizeof(output), &pos); } else { output_kind = TNT_COMMAND_OUTPUT_INBOX; append_inbox_output(client, output, sizeof(output), &pos); diff --git a/tests/test_user_lifecycle.sh b/tests/test_user_lifecycle.sh index f9885f2..fa23f2b 100755 --- a/tests/test_user_lifecycle.sh +++ b/tests/test_user_lifecycle.sh @@ -240,6 +240,7 @@ send -- ":" expect ":" send -- "inbox clear\r" expect "私信已清空" +expect "(空)" expect "q:关闭" send -- "q" expect "NORMAL"