mirror of
https://github.com/ethauvin/sdkman-for-fish.git
synced 2025-04-25 21:27:11 -07:00
Migrate reinitialization test to Cucumber.
This commit is contained in:
parent
56bc601b17
commit
0a948c81c1
6 changed files with 67 additions and 30 deletions
|
@ -48,7 +48,7 @@ def run_bash_command(cmd)
|
|||
status: File.read(files[:status]).to_i,
|
||||
stdout: File.readlines(files[:stdout]),
|
||||
stderr: File.readlines(files[:stderr]),
|
||||
env: File.readlines(files[:env])
|
||||
env: File.readlines(files[:env]).map { |l| l.strip.split('=', 2) }.to_h
|
||||
}
|
||||
end
|
||||
end
|
||||
|
@ -83,7 +83,7 @@ def run_fish_command(cmd)
|
|||
status: File.read(files[:status]).to_i,
|
||||
stdout: File.readlines(files[:stdout]),
|
||||
stderr: File.readlines(files[:stderr]),
|
||||
env: File.readlines(files[:env])
|
||||
env: File.readlines(files[:env]).map { |l| l.strip.split('=', 2) }.to_h
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
@ -20,6 +20,13 @@ ParameterType(
|
|||
end
|
||||
)
|
||||
|
||||
ParameterType(
|
||||
name: 'env_name',
|
||||
regexp: /[A-Z_]+/,
|
||||
type: String,
|
||||
transformer: ->(s) { s }
|
||||
)
|
||||
|
||||
ParameterType(
|
||||
name: 'env_glob',
|
||||
regexp: /[A-Z_*]+/,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue