diff --git a/pkg/omf/functions/packages/omf.packages.list.fish b/pkg/omf/functions/packages/omf.packages.list.fish index c2b3f8e..d860f0d 100644 --- a/pkg/omf/functions/packages/omf.packages.list.fish +++ b/pkg/omf/functions/packages/omf.packages.list.fish @@ -14,8 +14,8 @@ function omf.packages.list -d 'List installed packages' set -e show_plugins end - set -l plugins_paths {$OMF_CONFIG, $OMF_PATH}/pkg/* - set -l themes_paths {$OMF_CONFIG, $OMF_PATH}/themes/* + set -l plugins_paths {$OMF_PATH,$OMF_CONFIG}/pkg/* + set -l themes_paths {$OMF_PATH,$OMF_CONFIG}/themes/* if set -q show_plugins for path in $plugins_paths diff --git a/pkg/omf/spec/omf_list_spec.fish b/pkg/omf/spec/omf_list_spec.fish new file mode 100644 index 0000000..3a0d2aa --- /dev/null +++ b/pkg/omf/spec/omf_list_spec.fish @@ -0,0 +1,32 @@ +function describe_omf_list_tests + function before_all + set -gx CI WORKAROUND + end + + function it_can_list_plugins + set -l list_output (omf list -p) + assert 0 = $status + assert "$list_output" = "fish-spec omf" + end + + function it_can_list_themes + set -l list_output (omf list -t) + assert 0 = $status + assert "$list_output" = "default" + end + + function it_can_list_insttalled_plugins + set -l output (omf remove apt 2> /dev/null) + set -l output (omf install apt 2> /dev/null) + set -l list_output (omf list -p) + assert 0 = $status + assert "$list_output" = "apt fish-spec omf" + set -l output (omf remove apt 2> /dev/null) + end + + function it_can_list_themes + set -l list_output (omf list -t) + assert 0 = $status + assert "$list_output" = "default" + end +end