mirror of
https://github.com/ethauvin/sdkman-for-fish.git
synced 2025-04-25 05:17:11 -07:00
parent
e9f967501c
commit
ee7edbd9aa
7 changed files with 36 additions and 38 deletions
|
@ -52,8 +52,8 @@ Feature: Support autoenv setting
|
|||
1.10.1
|
||||
"""
|
||||
|
||||
# TODO: This one doesn't work due to a bug in sdkman. Track: https://github.com/sdkman/sdkman-cli/pull/878
|
||||
@pending
|
||||
# TODO: But that PR had been merged back when -- re-investigate
|
||||
@pending # This one doesn't work due to a bug in sdkman. Track: https://github.com/sdkman/sdkman-cli/pull/878
|
||||
Scenario: Switching between directories with .sdkmanrc
|
||||
Given SDKMAN! config sets sdkman_auto_env to true
|
||||
And file /tmp/autoenv-test-1/.sdkmanrc exists with content
|
||||
|
|
|
@ -9,7 +9,7 @@ Feature: Shell Completion
|
|||
|
||||
Scenario: Command list correct
|
||||
When the user enters " " into the prompt
|
||||
Then completion should propose "b, broadcast, c, current, d, default, flush, h, help, i, install, list, ls, offline, rm, selfupdate, u, ug, uninstall, update, upgrade, use, v, version"
|
||||
Then completion should propose "c, current, d, default, flush, h, help, i, install, list, ls, offline, rm, selfupdate, u, ug, uninstall, update, upgrade, use, v, version"
|
||||
|
||||
Scenario Outline: Commands complete
|
||||
When the user enters "<cmd>" into the prompt
|
||||
|
@ -17,7 +17,6 @@ Feature: Shell Completion
|
|||
But completion should not propose <exclusions>
|
||||
Examples:
|
||||
| cmd | completions | exclusions |
|
||||
| b | b, broadcast | /^[^b]+$/ |
|
||||
| c | c, current | /^[^c]+$/ |
|
||||
| d | d, default | /^[^d]+$/ |
|
||||
| e | e, env | /^[^e]+$/ |
|
||||
|
@ -39,6 +38,7 @@ Feature: Shell Completion
|
|||
# Currently uncovered (except by fuzzy matches);
|
||||
# include negatives to prevent accidents:
|
||||
| a | | /^a/ |
|
||||
| b | | /^b/ |
|
||||
| g | | /^g/ |
|
||||
| j | | /^j/ |
|
||||
| k | | /^k/ |
|
||||
|
@ -143,16 +143,16 @@ Feature: Shell Completion
|
|||
Then completion should propose "<completions>"
|
||||
But completion should not propose <exclusions>
|
||||
Examples:
|
||||
| cmd | completions | exclusions |
|
||||
| | init, install, clear | /^(?!init\|install\|clear).*$/ |
|
||||
| i | init, install | /^(?!init\|install).*$/ |
|
||||
| ini | init | /^(?!init).*$/ |
|
||||
| ins | install | /^(?!install).*$/ |
|
||||
| c | clear | /^(?!clear).*$/ |
|
||||
| b | | /.*/ |
|
||||
| 'init ' | | /.*/ |
|
||||
| 'clear ' | | /.*/ |
|
||||
| 'install ' | | /.*/ |
|
||||
| cmd | completions | exclusions |
|
||||
| | init, install, clear | /^(?!init\|install\|clear).*$/ |
|
||||
| i | init, install | /^(?!init\|install).*$/ |
|
||||
| ini | init | /^(?!init).*$/ |
|
||||
| ins | install | /^(?!install).*$/ |
|
||||
| c | clear | /^(?!clear).*$/ |
|
||||
| b | | /.*/ |
|
||||
| 'init ' | | /.*/ |
|
||||
| 'clear ' | | /.*/ |
|
||||
| 'install ' | | /.*/ |
|
||||
|
||||
Scenario Outline: Completion for 'current'
|
||||
When the user enters "current <cmd>" into the prompt
|
||||
|
@ -206,25 +206,21 @@ Feature: Shell Completion
|
|||
Then completion should propose "<completions>"
|
||||
But completion should not propose <exclusions>
|
||||
Examples:
|
||||
| cmd | completions | exclusions |
|
||||
| | archives, broadcast, tmp, version | /^(?!archives\|broadcast\|tmp\|version).*$/ |
|
||||
| b | broadcast | /^(?!broadcast).*$/ |
|
||||
| a | archives | /^(?!archives\|broadcast).*$/ |
|
||||
| t | tmp | /^(?!tmp\|broadcast).*$/ |
|
||||
| v | version | /^(?!version\|archives).*$/ |
|
||||
| x | | /.*/ |
|
||||
| 'tmp ' | | /.*/ |
|
||||
| cmd | completions | exclusions |
|
||||
| | temp, version | /^(?!temp\|version).*$/ |
|
||||
| t | temp | /^(?!temp).*$/ |
|
||||
| v | version | /^(?!version).*$/ |
|
||||
| x | | /.*/ |
|
||||
| 'tmp ' | | /.*/ |
|
||||
|
||||
Scenario Outline: Completion for commands without parameters
|
||||
When the user enters "<cmd>" into the prompt
|
||||
Then completion should not propose /.*/
|
||||
Examples:
|
||||
| cmd |
|
||||
| 'version ' |
|
||||
| 'version a' |
|
||||
| 'broadcast ' |
|
||||
| 'broadcast a' |
|
||||
| 'help ' |
|
||||
| 'help a' |
|
||||
| 'update ' |
|
||||
| 'update a' |
|
||||
| cmd |
|
||||
| 'version ' |
|
||||
| 'version a' |
|
||||
| 'help ' |
|
||||
| 'help a' |
|
||||
| 'update ' |
|
||||
| 'update a' |
|
||||
|
|
|
@ -12,6 +12,7 @@ Feature: Corner Cases
|
|||
|
||||
# TODO: add test that fails if `test` in conf.d/sdk.fish:80 errors (cf issue #28 et al.)
|
||||
|
||||
@pending # cf. issue #10
|
||||
Scenario: PATH should contain only valid paths
|
||||
Given candidate kscript is installed
|
||||
When candidate kscript is uninstalled
|
||||
|
|
|
@ -31,7 +31,7 @@ Feature: Wrapping of Bash
|
|||
| sdk update |
|
||||
| sdk use ant 1.9.9 |
|
||||
| sdk offline enable > /dev/null; sdk install ant foo |
|
||||
| sdk use ant 1.9.9 > /dev/null; sdk broadcast |
|
||||
| sdk use ant 1.9.9 > /dev/null; sdk version |
|
||||
| sdk home ant 1.9.9 |
|
||||
| cd /tmp/env-test; sdk env |
|
||||
| cd /tmp/env-test; sdk env; sdk env clear |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue