Simple test for completing redirections

This commit is contained in:
ridiculousfish 2014-05-02 10:00:00 -07:00
parent ef3259035d
commit c66a574fa0

View file

@ -1866,6 +1866,11 @@ static void test_complete(void)
complete(L"echo (builtin scuttlebut", completions, COMPLETION_REQUEST_DEFAULT);
do_test(completions.size() == 0);
/* Not after a redirection */
completions.clear();
complete(L"echo hi > scuttlebut", completions, COMPLETION_REQUEST_DEFAULT);
do_test(completions.size() == 0);
/* Trailing spaces (#1261) */
complete_add(L"foobarbaz", false, 0, NULL, 0, NO_FILES, NULL, L"qux", NULL, COMPLETE_AUTO_SPACE);
completions.clear();