diff --git a/tests/test-c-plugin/test-c-plugin.c b/tests/test-c-plugin/test-c-plugin.c index 99e68e2..57cc0cb 100644 --- a/tests/test-c-plugin/test-c-plugin.c +++ b/tests/test-c-plugin/test-c-plugin.c @@ -163,11 +163,42 @@ void prof_init(const char * const version, const char * const status) { prof_win_create(plugin_win, handle_win_input); - prof_register_command("/c-test", 1, 3, "/c-test", "C Test plugin", "C Test plugin", cmd_ctest); + + const char *synopsis[] = { + "/c-test consalert", + "/c-test consshow ", + "/c-test notify ", + "/c-test sendline ", + "/c-test get recipient|room", + "/c-test log debug|info|warning|error ", + NULL + }; + const char *description = "C test plugins."; + const char *args[][2] = { + { "consalert", "Highlight the console window in the status bar" }, + { "consshow ", "Show the message in the console window" }, + { "notify ", "Send a desltop notification with message" }, + { "sendline ", "Pass line to profanity to process" }, + { "get recipient", "Show the current chat recipient, if in a chat window" }, + { "get room", "Show the current room JID, if in a chat room" }, + { "log debug|info|warning|error", "Log a message at the specified level" }, + { NULL, NULL } + }; + + const char *examples[] = { + "/c-test sendline /about", + "/c-test log debug \"Test debug message\"", + NULL + }; + + prof_register_command("/c-test", 1, 3, synopsis, description, args, examples, cmd_ctest); + char *cmd_ac[] = { "consalert", "consshow", "notify", "sendline", "get", "log", NULL }; prof_register_ac("/c-test", cmd_ac); + char *get_ac[] = { "recipient", "room", NULL }; prof_register_ac("/c-test get", get_ac); + char *log_ac[] = { "debug", "info", "warning", "error", NULL }; prof_register_ac("/c-test log", log_ac); }