fix(test): Adapt tests to changes 5.9 -> 5.18

ref: issue #41
This commit is contained in:
Raphael Reitzig 2023-06-25 19:00:02 +02:00
parent e9f967501c
commit ee7edbd9aa
7 changed files with 36 additions and 38 deletions

View file

@ -3,9 +3,9 @@
<deployment type="dockerfile"> <deployment type="dockerfile">
<settings> <settings>
<option name="imageTag" value="sdkman-for-fish-tests" /> <option name="imageTag" value="sdkman-for-fish-tests" />
<option name="containerName" value="" /> <option name="containerName" value="sdkman-for-fish-tests" />
<option name="contextFolderPath" value="." /> <option name="contextFolderPath" value="." />
<option name="commandLineOptions" value="--rm" /> <option name="commandLineOptions" value="" />
<option name="sourceFilePath" value="test/Dockerfile" /> <option name="sourceFilePath" value="test/Dockerfile" />
</settings> </settings>
</deployment> </deployment>

View file

@ -13,10 +13,11 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
### Features ### Features
- Compatibility with SDKMAN! 5.9.2 - Compatibility with SDKMAN! 5.18.2
- Completions for `env`, `home`, `flush` (issue #35) - Completions for `env`, `home`, `flush` (issue #35)
- Correct behaviour of `env clear`. - Correct behaviour of `env clear`.
- Honor `sdkman_auto_env=true` (issue #38) - Honor `sdkman_auto_env=true` (issue #38)
- `broadcast` removed
- TODO: custom SDKMAN! install path (issue #34) - TODO: custom SDKMAN! install path (issue #34)
- Compatibility with fisher 4 (PR #37, #39) - Compatibility with fisher 4 (PR #37, #39)

View file

@ -10,9 +10,9 @@ Also adds binaries from installed SDKs to the PATH.
Version 2.0.0 has been tested with Version 2.0.0 has been tested with
- fish 3.1.2, and - fish 3.6.1, and
- SDKMAN! 5.11.0, on - SDKMAN! 5.18.2, on
- Ubuntu 20.04 LTS and macOS 10.15 - Ubuntu 22.04 LTS and macOS 12.6
## Install ## Install

View file

@ -52,8 +52,8 @@ Feature: Support autoenv setting
1.10.1 1.10.1
""" """
# TODO: This one doesn't work due to a bug in sdkman. Track: https://github.com/sdkman/sdkman-cli/pull/878 # TODO: But that PR had been merged back when -- re-investigate
@pending @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 Scenario: Switching between directories with .sdkmanrc
Given SDKMAN! config sets sdkman_auto_env to true Given SDKMAN! config sets sdkman_auto_env to true
And file /tmp/autoenv-test-1/.sdkmanrc exists with content And file /tmp/autoenv-test-1/.sdkmanrc exists with content

View file

@ -9,7 +9,7 @@ Feature: Shell Completion
Scenario: Command list correct Scenario: Command list correct
When the user enters " " into the prompt 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 Scenario Outline: Commands complete
When the user enters "<cmd>" into the prompt When the user enters "<cmd>" into the prompt
@ -17,7 +17,6 @@ Feature: Shell Completion
But completion should not propose <exclusions> But completion should not propose <exclusions>
Examples: Examples:
| cmd | completions | exclusions | | cmd | completions | exclusions |
| b | b, broadcast | /^[^b]+$/ |
| c | c, current | /^[^c]+$/ | | c | c, current | /^[^c]+$/ |
| d | d, default | /^[^d]+$/ | | d | d, default | /^[^d]+$/ |
| e | e, env | /^[^e]+$/ | | e | e, env | /^[^e]+$/ |
@ -39,6 +38,7 @@ Feature: Shell Completion
# Currently uncovered (except by fuzzy matches); # Currently uncovered (except by fuzzy matches);
# include negatives to prevent accidents: # include negatives to prevent accidents:
| a | | /^a/ | | a | | /^a/ |
| b | | /^b/ |
| g | | /^g/ | | g | | /^g/ |
| j | | /^j/ | | j | | /^j/ |
| k | | /^k/ | | k | | /^k/ |
@ -207,11 +207,9 @@ Feature: Shell Completion
But completion should not propose <exclusions> But completion should not propose <exclusions>
Examples: Examples:
| cmd | completions | exclusions | | cmd | completions | exclusions |
| | archives, broadcast, tmp, version | /^(?!archives\|broadcast\|tmp\|version).*$/ | | | temp, version | /^(?!temp\|version).*$/ |
| b | broadcast | /^(?!broadcast).*$/ | | t | temp | /^(?!temp).*$/ |
| a | archives | /^(?!archives\|broadcast).*$/ | | v | version | /^(?!version).*$/ |
| t | tmp | /^(?!tmp\|broadcast).*$/ |
| v | version | /^(?!version\|archives).*$/ |
| x | | /.*/ | | x | | /.*/ |
| 'tmp ' | | /.*/ | | 'tmp ' | | /.*/ |
@ -222,8 +220,6 @@ Feature: Shell Completion
| cmd | | cmd |
| 'version ' | | 'version ' |
| 'version a' | | 'version a' |
| 'broadcast ' |
| 'broadcast a' |
| 'help ' | | 'help ' |
| 'help a' | | 'help a' |
| 'update ' | | 'update ' |

View file

@ -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.) # 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 Scenario: PATH should contain only valid paths
Given candidate kscript is installed Given candidate kscript is installed
When candidate kscript is uninstalled When candidate kscript is uninstalled

View file

@ -31,7 +31,7 @@ Feature: Wrapping of Bash
| sdk update | | sdk update |
| sdk use ant 1.9.9 | | sdk use ant 1.9.9 |
| sdk offline enable > /dev/null; sdk install ant foo | | 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 | | sdk home ant 1.9.9 |
| cd /tmp/env-test; sdk env | | cd /tmp/env-test; sdk env |
| cd /tmp/env-test; sdk env; sdk env clear | | cd /tmp/env-test; sdk env; sdk env clear |