diff --git a/tests/python-test.py b/tests/python-test.py index 2d7eb24..8886863 100644 --- a/tests/python-test.py +++ b/tests/python-test.py @@ -38,8 +38,19 @@ def _handle_upper(win, line): def prof_init(version, status): prof.cons_show("python-test: init, " + version + ", " + status) + prof.register_command("/python", 0, 1, "/python", "python-test", "python-test", _cmd_python) + prof.register_command("/upper", 0, 1, "/upper", "Uppercase input string", "Uppercase input string", _cmd_upper) + + arg_ac = [ "aah", "baa", "bee" ] + prof.register_ac("/pcomplete", arg_ac); + arg_one_ac = [ "one", "two", "three", "nan" ] + prof.register_ac("/pcomplete aah", arg_one_ac); + arg_two_ac = [ "james", "jim", "jane", "bob" ] + prof.register_ac("/pcomplete baa", arg_two_ac); + prof.register_command("/pcomplete", 0, 2, "/pcomplete", "Python completion", "Python completion", _cmd_upper) + prof.register_timed(_timer_test, 10) def prof_on_start(): diff --git a/tests/test-c-plugin/test-c-plugin.c b/tests/test-c-plugin/test-c-plugin.c index 007791d..0e98c08 100644 --- a/tests/test-c-plugin/test-c-plugin.c +++ b/tests/test-c-plugin/test-c-plugin.c @@ -77,8 +77,17 @@ prof_init(const char * const version, const char * const status) char buf[strlen(start) + strlen(version) + 2 + strlen(status) + 1]; sprintf(buf, "%s%s, %s", start, version, status); prof_cons_show(buf); + prof_register_command("/c", 0, 1, "/c", "c test", "c test", cmd_c); + prof_register_command("/reverse", 0, 1, "/reverse", "Reverse input string", "Reverse input string", cmd_reverse); + + char *arg_ac[] = { "one", "two", "three", NULL }; + prof_register_ac("/ccomplete", arg_ac); + char *arg_one_ac[] = { "james", "bob", "jenny", "steven", NULL }; + prof_register_ac("/ccomplete one", arg_one_ac); + prof_register_command("/ccomplete", 0, 2, "/ccomplete", "C completion", "C completion", cmd_reverse); + prof_register_timed(timer_test, 10); }