Merge branch 'dev'

Closes issue #24.
This commit is contained in:
Raphael Reitzig 2018-11-09 20:41:16 +01:00
commit aa13155167
2 changed files with 10 additions and 3 deletions

View file

@ -41,6 +41,7 @@ function __fish_sdkman_run_in_bash
bash -c "$argv[1];
echo -e \"\$?\" > $pipe;
env | grep -e '^SDKMAN_\|^PATH' >> $pipe;
env | grep -i -E \"^(`echo \${SDKMAN_CANDIDATES_CSV} | sed 's/,/|/g'`)_HOME\" >> $pipe;
echo \"SDKMAN_OFFLINE_MODE=\${SDKMAN_OFFLINE_MODE}\" >> $pipe" # it's not an environment variable!
set bashDump (cat $pipe; rm $pipe)

View file

@ -23,14 +23,20 @@ echo "Testing the sdk wrapper"
set failures 0
for sdk_cmd in $test_commands
echo " Testing '$sdk_cmd'"
bash -c "source \"$sdk_init\" && $sdk_cmd > sout_bash; echo \"\$?\" > status_bash; echo "\$PATH" > path_bash"
fish -c "$sdk_cmd > sout_fish; echo \"\$status\" > status_fish; echo "\$PATH" > path_fish"
bash -c "source \"$sdk_init\" && $sdk_cmd > sout_bash;
echo \"\$?\" > status_bash;
echo \"\$PATH\" > path_bash;
echo \"\$ANT_HOME\" > anthome_bash"
fish -c "$sdk_cmd > sout_fish;
echo \"\$status\" > status_fish;
echo \"\$PATH\" > path_fish;
echo \"\$ANT_HOME\" > anthome_fish"
# For nicer diffs: one entry per line, sorted
string split ":" (cat path_bash) | sort > path_bash
string split " " (cat path_fish) | sort > path_fish
for out in sout status path
for out in sout status path anthome
if [ (checksum "$out"_bash) != (checksum "$out"_fish) ]
echo " - $out bad:"
diff "$out"_bash "$out"_fish | sed -e 's/^/ /'