mirror of https://github.com/jorgebucaran/fisher
More tests, smarter manifest.
parent
4deb812606
commit
88fcbfd565
@ -1,26 +1,31 @@
|
||||
function __fisher_config_color_save
|
||||
if test ! -f "$fisher_config/fish_colors"
|
||||
printf "%s\n" \
|
||||
"$fish_color_normal" \
|
||||
"$fish_color_command" \
|
||||
"$fish_color_param" \
|
||||
"$fish_color_redirection" \
|
||||
"$fish_color_comment" \
|
||||
"$fish_color_error" \
|
||||
"$fish_color_escape" \
|
||||
"$fish_color_operator" \
|
||||
"$fish_color_quote" \
|
||||
"$fish_color_autosuggestion" \
|
||||
"$fish_color_valid_path" \
|
||||
"$fish_color_cwd" \
|
||||
"$fish_color_cwd_root" \
|
||||
"$fish_color_match" \
|
||||
"$fish_color_search_match" \
|
||||
"$fish_color_selection" \
|
||||
"$fish_pager_color_prefix" \
|
||||
"$fish_pager_color_completion" \
|
||||
"$fish_pager_color_description" \
|
||||
"$fish_pager_color_progress" \
|
||||
"$fish_color_history_current" > "$fisher_config/fish_colors"
|
||||
function __fisher_config_color_save -a path
|
||||
if test -f "$path"
|
||||
return 1
|
||||
end
|
||||
|
||||
printf "%s\n" \
|
||||
"$fish_color_normal" \
|
||||
"$fish_color_command" \
|
||||
"$fish_color_param" \
|
||||
"$fish_color_redirection" \
|
||||
"$fish_color_comment" \
|
||||
"$fish_color_error" \
|
||||
"$fish_color_escape" \
|
||||
"$fish_color_operator" \
|
||||
"$fish_color_end" \
|
||||
"$fish_color_quote" \
|
||||
"$fish_color_autosuggestion" \
|
||||
"$fish_color_user" \
|
||||
"$fish_color_valid_path" \
|
||||
"$fish_color_cwd" \
|
||||
"$fish_color_cwd_root" \
|
||||
"$fish_color_match" \
|
||||
"$fish_color_search_match" \
|
||||
"$fish_color_selection" \
|
||||
"$fish_pager_color_prefix" \
|
||||
"$fish_pager_color_completion" \
|
||||
"$fish_pager_color_description" \
|
||||
"$fish_pager_color_progress" \
|
||||
"$fish_color_history_current" \
|
||||
"$fish_color_host" > "$path"
|
||||
end
|
||||
|
@ -1,3 +1,24 @@
|
||||
test "$TESTNAME - Todo"
|
||||
-z ""
|
||||
set -l path $DIRNAME/.t-$TESTNAME-(random)
|
||||
|
||||
function -S setup
|
||||
mkdir -p $path/{foo,bar}
|
||||
|
||||
__fisher_config_color_save $path/foo/fish_colors
|
||||
|
||||
touch $path/bar/fish_colors
|
||||
end
|
||||
|
||||
function -S teardown
|
||||
rm -rf $path
|
||||
end
|
||||
|
||||
test "$TESTNAME - Create fish_colors in path"
|
||||
-s $path/foo/fish_colors
|
||||
end
|
||||
|
||||
test "$TESTNAME - Create fish_colors in path"
|
||||
1 = (
|
||||
__fisher_config_color_save $path/bar/fish_colors
|
||||
echo $status
|
||||
)
|
||||
end
|
||||
|
@ -1,11 +1,9 @@
|
||||
set -l manifest $DIRNAME/fixtures/manifest
|
||||
|
||||
set -l plugins foo bar baz norf zerg quux hoge foobar fred thud chomp boo loo gisty
|
||||
set -l plugins foo bar baz quux hoge foobar fred thud chomp gisty mof
|
||||
|
||||
test "$TESTNAME - Parse fishfile and retrieve plugin names with fisher list fishfile"
|
||||
|
||||
# We use fisher list <file> to parse <file> and then extract the plugin's name
|
||||
# as it will be used by the CLI. See also `test/name.fish`.
|
||||
|
||||
(fisher list $manifest/fishfile) = $plugins
|
||||
$plugins = (
|
||||
fisher list $manifest/fishfile
|
||||
)
|
||||
end
|
||||
|
Loading…
Reference in New Issue