mirror of
https://github.com/ethauvin/sdkman-for-fish.git
synced 2025-04-25 05:17:11 -07:00
fix(test): Use kscript as test candidate
instead of crash, which doesn't exist anymore
This commit is contained in:
parent
1b2824d37f
commit
e9f967501c
4 changed files with 57 additions and 57 deletions
|
@ -7,8 +7,8 @@ Feature: Support autoenv setting
|
||||||
And candidate ant is installed at version 1.9.7
|
And candidate ant is installed at version 1.9.7
|
||||||
And candidate ant is installed at version 1.9.9
|
And candidate ant is installed at version 1.9.9
|
||||||
And candidate ant is installed at version 1.10.1
|
And candidate ant is installed at version 1.10.1
|
||||||
And candidate crash is installed at version 1.2.11
|
And candidate kscript is installed at version 1.5.0
|
||||||
And candidate crash is installed at version 1.3.0
|
And candidate kscript is installed at version 1.6.0
|
||||||
|
|
||||||
Scenario: No action if autoenv turned off
|
Scenario: No action if autoenv turned off
|
||||||
Given SDKMAN! config sets sdkman_auto_env to false
|
Given SDKMAN! config sets sdkman_auto_env to false
|
||||||
|
@ -59,7 +59,7 @@ Feature: Support autoenv setting
|
||||||
And file /tmp/autoenv-test-1/.sdkmanrc exists with content
|
And file /tmp/autoenv-test-1/.sdkmanrc exists with content
|
||||||
"""
|
"""
|
||||||
ant=1.9.9
|
ant=1.9.9
|
||||||
crash=1.2.11
|
kscript=1.5.0
|
||||||
"""
|
"""
|
||||||
And file /tmp/autoenv-test-2/.sdkmanrc exists with content
|
And file /tmp/autoenv-test-2/.sdkmanrc exists with content
|
||||||
"""
|
"""
|
||||||
|
@ -67,18 +67,18 @@ Feature: Support autoenv setting
|
||||||
"""
|
"""
|
||||||
When we run fish script
|
When we run fish script
|
||||||
"""
|
"""
|
||||||
echo (basename (realpath $ANT_HOME)),(basename (realpath $CRASH_HOME)) > /tmp/autoenv-test.log
|
echo (basename (realpath $ANT_HOME)),(basename (realpath $KSCRIPT_HOME)) > /tmp/autoenv-test.log
|
||||||
cd /tmp/autoenv-test-1
|
cd /tmp/autoenv-test-1
|
||||||
echo (basename (realpath $ANT_HOME)),(basename (realpath $CRASH_HOME)) >> /tmp/autoenv-test.log
|
echo (basename (realpath $ANT_HOME)),(basename (realpath $KSCRIPT_HOME)) >> /tmp/autoenv-test.log
|
||||||
cd ../autoenv-test-2
|
cd ../autoenv-test-2
|
||||||
echo (basename (realpath $ANT_HOME)),(basename (realpath $CRASH_HOME)) >> /tmp/autoenv-test.log
|
echo (basename (realpath $ANT_HOME)),(basename (realpath $KSCRIPT_HOME)) >> /tmp/autoenv-test.log
|
||||||
cd ..
|
cd ..
|
||||||
echo (basename (realpath $ANT_HOME)),(basename (realpath $CRASH_HOME)) >> /tmp/autoenv-test.log
|
echo (basename (realpath $ANT_HOME)),(basename (realpath $KSCRIPT_HOME)) >> /tmp/autoenv-test.log
|
||||||
"""
|
"""
|
||||||
Then file /tmp/autoenv-test.log contains
|
Then file /tmp/autoenv-test.log contains
|
||||||
"""
|
"""
|
||||||
1.10.1,1.3.0
|
1.10.1,1.6.0
|
||||||
1.9.9,1.2.11
|
1.9.9,1.5.0
|
||||||
1.9.7,1.3.0
|
1.9.7,1.6.0
|
||||||
1.10.1,1.3.0
|
1.10.1,1.6.0
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -5,7 +5,7 @@ Feature: Shell Completion
|
||||||
Given SDKMAN! candidate list is up to date
|
Given SDKMAN! candidate list is up to date
|
||||||
And candidate ant is installed at version 1.9.9
|
And candidate ant is installed at version 1.9.9
|
||||||
And candidate ant is installed at version 1.10.1
|
And candidate ant is installed at version 1.10.1
|
||||||
And candidate crash is installed
|
And candidate kscript is installed
|
||||||
|
|
||||||
Scenario: Command list correct
|
Scenario: Command list correct
|
||||||
When the user enters " " into the prompt
|
When the user enters " " into the prompt
|
||||||
|
@ -75,11 +75,11 @@ Feature: Shell Completion
|
||||||
But completion should not propose <exclusions>
|
But completion should not propose <exclusions>
|
||||||
Examples:
|
Examples:
|
||||||
| cmd | completions | exclusions |
|
| cmd | completions | exclusions |
|
||||||
| | ant, crash | gradle |
|
| | ant, kscript | gradle |
|
||||||
| a | ant | gradle |
|
| a | ant | gradle |
|
||||||
| j | | /.*/ |
|
| j | | /.*/ |
|
||||||
| 1. | | /.*/ |
|
| 1. | | /.*/ |
|
||||||
| an | ant | gradle, crash | # some installed
|
| an | ant | gradle, kscript | # some installed
|
||||||
| gr | | /.*/ | # none installed
|
| gr | | /.*/ | # none installed
|
||||||
| xyz | | /.*/ | # no such candidate
|
| xyz | | /.*/ | # no such candidate
|
||||||
| 'an ' | | /.*/ | # no such candidate installed
|
| 'an ' | | /.*/ | # no such candidate installed
|
||||||
|
@ -94,7 +94,7 @@ Feature: Shell Completion
|
||||||
But completion should not propose <exclusions>
|
But completion should not propose <exclusions>
|
||||||
Examples:
|
Examples:
|
||||||
| cmd | completions | exclusions |
|
| cmd | completions | exclusions |
|
||||||
| an | ant | crash |
|
| an | ant | kscript |
|
||||||
| xyz | | /.*/ |
|
| xyz | | /.*/ |
|
||||||
| 1. | | /.*/ |
|
| 1. | | /.*/ |
|
||||||
| 'ant ' | | /.*/ |
|
| 'ant ' | | /.*/ |
|
||||||
|
@ -105,8 +105,8 @@ Feature: Shell Completion
|
||||||
But completion should not propose <exclusions>
|
But completion should not propose <exclusions>
|
||||||
Examples:
|
Examples:
|
||||||
| cmd | completions | exclusions |
|
| cmd | completions | exclusions |
|
||||||
| | ant, crash | gradle |
|
| | ant, kscript | gradle |
|
||||||
| an | ant | crash, gradle |
|
| an | ant | kscript, gradle |
|
||||||
| j | | /.*/ |
|
| j | | /.*/ |
|
||||||
| 1. | | /.*/ |
|
| 1. | | /.*/ |
|
||||||
| 'ant ' | 1.10.1, 1.9.9 | /^\w+$/ |
|
| 'ant ' | 1.10.1, 1.9.9 | /^\w+$/ |
|
||||||
|
@ -118,8 +118,8 @@ Feature: Shell Completion
|
||||||
But completion should not propose <exclusions>
|
But completion should not propose <exclusions>
|
||||||
Examples:
|
Examples:
|
||||||
| cmd | completions | exclusions |
|
| cmd | completions | exclusions |
|
||||||
| | ant, crash | gradle |
|
| | ant, kscript | gradle |
|
||||||
| an | ant | crash, gradle |
|
| an | ant | kscript, gradle |
|
||||||
| j | | /.*/ |
|
| j | | /.*/ |
|
||||||
| 1. | | /.*/ |
|
| 1. | | /.*/ |
|
||||||
| 'ant ' | 1.10.1, 1.9.9 | /^\w+$/ |
|
| 'ant ' | 1.10.1, 1.9.9 | /^\w+$/ |
|
||||||
|
@ -131,8 +131,8 @@ Feature: Shell Completion
|
||||||
But completion should not propose <exclusions>
|
But completion should not propose <exclusions>
|
||||||
Examples:
|
Examples:
|
||||||
| cmd | completions | exclusions |
|
| cmd | completions | exclusions |
|
||||||
| | ant, crash | gradle |
|
| | ant, kscript | gradle |
|
||||||
| an | ant | crash, gradle |
|
| an | ant | kscript, gradle |
|
||||||
| j | | /.*/ |
|
| j | | /.*/ |
|
||||||
| 1. | | /.*/ |
|
| 1. | | /.*/ |
|
||||||
| 'ant ' | 1.10.1, 1.9.9 | /^\w+$/ |
|
| 'ant ' | 1.10.1, 1.9.9 | /^\w+$/ |
|
||||||
|
@ -172,8 +172,8 @@ Feature: Shell Completion
|
||||||
But completion should not propose <exclusions>
|
But completion should not propose <exclusions>
|
||||||
Examples:
|
Examples:
|
||||||
| cmd | completions | exclusions |
|
| cmd | completions | exclusions |
|
||||||
| | ant, crash | gradle |
|
| | ant, kscript | gradle |
|
||||||
| an | ant | crash, gradle |
|
| an | ant | kscript, gradle |
|
||||||
| j | | /.*/ |
|
| j | | /.*/ |
|
||||||
| 1. | | /.*/ |
|
| 1. | | /.*/ |
|
||||||
| 'ant ' | | /^\w+$/ |
|
| 'ant ' | | /^\w+$/ |
|
||||||
|
|
|
@ -13,6 +13,6 @@ 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.)
|
||||||
|
|
||||||
Scenario: PATH should contain only valid paths
|
Scenario: PATH should contain only valid paths
|
||||||
Given candidate crash is installed
|
Given candidate kscript is installed
|
||||||
When candidate crash is uninstalled
|
When candidate kscript is uninstalled
|
||||||
Then environment variable PATH cannot contain "sdkman/candidates/crash/"
|
Then environment variable PATH cannot contain "sdkman/candidates/kscript/"
|
||||||
|
|
|
@ -24,6 +24,6 @@ Then(/^the output is$/) do |text|
|
||||||
expect(@response_fish_script).to eq(text.strip)
|
expect(@response_fish_script).to eq(text.strip)
|
||||||
end
|
end
|
||||||
|
|
||||||
Then(/^file ([a-zA-Z0-9-_.\/]+) contains$/) do |file,content|
|
Then(/^file ([a-zA-Z0-9\-_.\/]+) contains$/) do |file,content|
|
||||||
expect(File.readlines(file).join("").strip).to eq(content.strip)
|
expect(File.readlines(file).join("").strip).to eq(content.strip)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue