diff --git a/tests/complete.in b/tests/checks/complete.fish similarity index 65% rename from tests/complete.in rename to tests/checks/complete.fish index 9ebd88cbe..4eec49851 100644 --- a/tests/complete.in +++ b/tests/checks/complete.fish @@ -1,5 +1,4 @@ -logmsg Completion Wrappers - +# RUN: %fish %s function complete_test_alpha1; echo $argv; end complete -c complete_test_alpha1 --no-files -a '(commandline)' @@ -7,28 +6,36 @@ complete -c complete_test_alpha2 --no-files -w 'complete_test_alpha1 extra1' complete -c complete_test_alpha3 --no-files -w 'complete_test_alpha2 extra2' complete -C'complete_test_alpha1 arg1 ' +# CHECK: complete_test_alpha1 arg1 complete -C'complete_test_alpha2 arg2 ' +# CHECK: complete_test_alpha1 extra1 arg2 complete -C'complete_test_alpha3 arg3 ' +# CHECK: complete_test_alpha1 extra1 extra2 arg3 # Works even with the argument as a separate token. complete -C 'complete_test_alpha3 arg3 ' - -logmsg Alias Completions +# CHECK: complete_test_alpha1 extra1 extra2 arg3 alias myalias1 'complete_test_alpha1 arg1' alias myalias2='complete_test_alpha1 arg2' myalias1 call1 myalias2 call2 +# CHECK: arg1 call1 +# CHECK: arg2 call2 complete -C'myalias1 call3 ' complete -C'myalias2 call3 ' +# CHECK: complete_test_alpha1 arg1 call3 +# CHECK: complete_test_alpha1 arg2 call3 # Ensure that commands can't wrap themselves - if this did, # the completion would be executed a bunch of times. function t --wraps t; echo t; end complete -c t -fa '(t)' complete -C't ' +# CHECK: t # Ensure file completion happens even though it was disabled above. complete -c t -l fileoption -rF -# Only match this file because I don't want to touch this any time we add a test file. -complete -C't --fileoption ' | string match complete.in +# Only match one file because I don't want to touch this any time we add a test file. +complete -C't --fileoption ' | string match bind.expect +# CHECK: bind.expect diff --git a/tests/complete.err b/tests/complete.err deleted file mode 100644 index b50147861..000000000 --- a/tests/complete.err +++ /dev/null @@ -1,6 +0,0 @@ - -#################### -# Completion Wrappers - -#################### -# Alias Completions diff --git a/tests/complete.out b/tests/complete.out deleted file mode 100644 index 264fb6a71..000000000 --- a/tests/complete.out +++ /dev/null @@ -1,16 +0,0 @@ - -#################### -# Completion Wrappers -complete_test_alpha1 arg1 -complete_test_alpha1 extra1 arg2 -complete_test_alpha1 extra1 extra2 arg3 -complete_test_alpha1 extra1 extra2 arg3 - -#################### -# Alias Completions -arg1 call1 -arg2 call2 -complete_test_alpha1 arg1 call3 -complete_test_alpha1 arg2 call3 -t -complete.in