From fb79486f9fe39f9c3498290af016c3957083e325 Mon Sep 17 00:00:00 2001 From: "Kevin F. Konrad" Date: Tue, 4 Mar 2025 18:10:40 +0100 Subject: [PATCH] reimplement fish-spec for nicer output (#955) * replace implementation of fish-spec provide a new implementation for fish-spec with more verbose and colored output and more assertion functions * fix indentation for fish-spec * properly namespace color echo functions in fish-spec * use line rewriting for fish-spec for more terse output * use fish 3.0.0 compatible syntax * fix assorted assertion bug * ensure tests actually pass * fix existing omf spec tests * simplify assert_in_array and assert_not_in_array --------- Co-authored-by: Kevin F. Konrad --- README.md | 10 + pkg/fish-spec/basic_formatter.fish | 59 ------ pkg/fish-spec/framework/assertions.fish | 180 ++++++++++++++++++ pkg/fish-spec/framework/color.fish | 39 ++++ .../functions/assert.error_message.fish | 31 --- .../functions/assert.expand_operator.fish | 10 - pkg/fish-spec/functions/assert.fish | 9 - pkg/fish-spec/functions/fish-spec.fish | 152 +++++++++------ .../spec/assert_error_message_spec.fish | 54 ------ pkg/fish-spec/spec/empty_spec.fish | 0 pkg/fish-spec/spec/results_spec.fish | 30 ++- pkg/fish-spec/utils/epoch.c | 10 - pkg/fish-spec/utils/epoch.linux | Bin 6832 -> 0 bytes pkg/fish-spec/utils/epoch.osx | Bin 8496 -> 0 bytes pkg/omf/spec/basic_spec.fish | 4 + pkg/omf/spec/omf_list_spec.fish | 4 + pkg/omf/spec/omf_packages_spec.fish | 4 + 17 files changed, 346 insertions(+), 250 deletions(-) delete mode 100644 pkg/fish-spec/basic_formatter.fish create mode 100644 pkg/fish-spec/framework/assertions.fish create mode 100644 pkg/fish-spec/framework/color.fish delete mode 100644 pkg/fish-spec/functions/assert.error_message.fish delete mode 100644 pkg/fish-spec/functions/assert.expand_operator.fish delete mode 100644 pkg/fish-spec/functions/assert.fish delete mode 100644 pkg/fish-spec/spec/assert_error_message_spec.fish create mode 100644 pkg/fish-spec/spec/empty_spec.fish delete mode 100644 pkg/fish-spec/utils/epoch.c delete mode 100755 pkg/fish-spec/utils/epoch.linux delete mode 100755 pkg/fish-spec/utils/epoch.osx diff --git a/README.md b/README.md index 5e079f4..9ef7201 100644 --- a/README.md +++ b/README.md @@ -203,6 +203,16 @@ It's highly recommended that your custom startup commands go into `init.fish` fi If you need startup commands to be run *before* Oh My Fish begins loading plugins, place them in `before.init.fish` instead. If you're unsure, it is usually best to put things in `init.fish`. +## Testing + +Oh My Fish provides a test framework inspired by RSpec called `fish-spec` via a built-in package. You can use +`fish-spec` to test your fish package by writing tests in `spec/*_spec.fish` files within your package. To run the tests +type in `fish-spec`. If your tests are in different files you can also list your test files (or globs of test files) +like so: `fish-spec tests/test_*.fish other-tests/foo.fish` + +For syntax and available assertions see the tests for the fish-spec package in +[pkg/fish-spec/spec/](https://github.com/oh-my-fish/oh-my-fish/tree/master/pkg/fish-spec/spec). + ## Creating Packages Oh My Fish uses an advanced and well defined plugin architecture to ease plugin development, including init/uninstall hooks, function and completion autoloading. [See the packages documentation](docs/en-US/Packages.md) for more details. diff --git a/pkg/fish-spec/basic_formatter.fish b/pkg/fish-spec/basic_formatter.fish deleted file mode 100644 index 60d9209..0000000 --- a/pkg/fish-spec/basic_formatter.fish +++ /dev/null @@ -1,59 +0,0 @@ -function __fish-spec.all_specs_init -e all_specs_init -a spec - set -g __fish_spec_start_time (__fish-spec.current_time) -end - -function __fish-spec.all_specs_finished -e all_specs_finished -a spec - set -l __fish_spec_end_time (__fish-spec.current_time) - set -l diff (math "($__fish_spec_end_time - $__fish_spec_start_time) * 0.001") - - echo -en '\n\nFinished in ' - printf '%g' $diff - echo ' seconds' -end - -function __fish-spec.spec_init -e spec_init -a spec - set -g __current_spec_name (echo $spec | sed 's/^[0-9]*_//;s/_/ /g;s/^it/It/') - set -e __current_spec_output - set -e __current_spec_status -end - -function __fish-spec.spec_finished -e spec_finished -a spec - functions -e $spec - - switch "$__current_spec_status" - case success - emit spec_success - case error - emit spec_error - case '*' - emit spec_no_assertions - end -end - -function __fish-spec.spec_success -e spec_success - echo -n '.' -end - -function __fish-spec.spec_error -e spec_error - echo -e "\n\nFailure: $__current_spec_name" - - if not set -q __current_spec_quiet - echo (omf::em) $__current_spec_output(omf::off) - end - - set -g __any_spec_failed true -end - -function __fish-spec.spec_no_assertions -e spec_no_assertions - echo -n 'N/A' -end - -function __fish-spec_assertion_success -e assertion_success - set -q __current_spec_status; or set -g __current_spec_status success -end - -function __fish-spec_assertion_error -e assertion_error -a error_message - # Mimics output redirect inside an event handler - set -g __current_spec_output $error_message - set -g __current_spec_status error -end diff --git a/pkg/fish-spec/framework/assertions.fish b/pkg/fish-spec/framework/assertions.fish new file mode 100644 index 0000000..8d30330 --- /dev/null +++ b/pkg/fish-spec/framework/assertions.fish @@ -0,0 +1,180 @@ +function __fish_spec_assert_generic -a first second success_template failure_template test_command + set __fish_spec_total_assertions_in_file (math $__fish_spec_total_assertions_in_file + 1) + + if eval not "$test_command" + set __fish_spec_failed_assertions_in_file (math $__fish_spec_failed_assertions_in_file + 1) + set __fish_spec_last_assertion_failed yes + eval __fish_spec.color.echo.failure "$failure_template" + return 1 + end + if test "$FISH_SPEC_VERBOSE" = 1 + eval __fish_spec.color.echo.success "$success_template" + end +end + +function assert + set -l first "$argv" + __fish_spec_assert_generic \ + $first unused \ + 'Assertion \"test $first\" passed!' \ + 'Assertion failed: \"test $first\" evaluated to false.' \ + "test '$argv'" + return $status +end + +function assert_equal -a first second + __fish_spec_assert_generic \ + $first $second \ + 'Assertion \"$first\" == \"$second\" passed!' \ + 'Assertion failed: Expected \"$first\", but got \"$second\".' \ + 'test "$first" = "$second"' +end + +function assert_not_equal -a first second + __fish_spec_assert_generic \ + $first $second \ + 'Assertion \"$first\" != \"$second\" passed!' \ + 'Assertion failed: Expected \"$second\" to be different from \"$expecte\".' \ + 'test "$first" != "$second"' +end + +function assert_exit_code -a expected_status + __fish_spec_assert_generic \ + $expected_status $status \ + 'Assertion exit code $second == $first passed!' \ + 'Assertion failed: Expected exit code $first, but got $second.' \ + 'test "$first" -eq "$second"' +end + +function assert_ok + assert_exit_code 0 +end + +function assert_true -a condition + __fish_spec_assert_generic \ + $condition 0 \ + 'Assertion \"$first\" is true passed!' \ + 'Assertion failed: Expected true, but got \"$first\".' \ + 'test $first' +end + +function assert_false -a condition + __fish_spec_assert_generic \ + $condition 0 \ + 'Assertion \"$first\" is false passed!' \ + 'Assertion failed: Expected false, but got \"$first\".' \ + 'test ! $first' +end + +function assert_match -a pattern string + __fish_spec_assert_generic \ + $pattern $string \ + 'Assertion string \"$string\" matches pattern \"$pattern\" passed!' \ + 'Assertion failed: string \"$second\" does not match pattern \"$first\".' \ + 'string match -qr $first $second' +end + + +function assert_match -a pattern string + __fish_spec_assert_generic \ + $pattern $string \ + 'Assertion string \"$string\" does not match pattern \"$pattern\" passed!' \ + 'Assertion failed: string \"$second\" does not match pattern \"$first\".' \ + 'not string match -qr $first $second' +end + +function assert_file_exists -a file + __fish_spec_assert_generic \ + $file unused \ + 'Assertion file \"$first\" exists passed!' \ + 'Assertion failed: File \"$first\" does not exist.' \ + 'test -f $first' +end + +function assert_file_does_not_exist -a file + __fish_spec_assert_generic \ + $file unused \ + 'Assertion file \"$first\" does not exist passed!' \ + 'Assertion failed: File \"$first\" exists.' \ + 'not test -f $first' +end + +function assert_directory_exists -a dir + __fish_spec_assert_generic \ + $dir unused \ + 'Assertion directory \"$first\" exists passed!' \ + 'Assertion failed: Directory \"$first\" does not exist.' \ + 'test -d $dir' +end + +function assert_directory_does_not_exist -a file + __fish_spec_assert_generic \ + $file unused \ + 'Assertion directory \"$first\" does not exist passed!' \ + 'Assertion failed: Directory \"$first\" exists.' \ + 'not test -d $first' +end + +function assert_file_empty -a file + __fish_spec_assert_generic \ + $file unused \ + 'Assertion file $first is empty passed!' \ + 'Assertion failed: File \"$first\" is not empty.' \ + 'not test -s $file' +end + +function assert_file_contains -a file content + __fish_spec_assert_generic \ + $file $content \ + 'Assertion $first contains \"$second\" passed!' \ + 'Assertion failed: File \"$first\" does not contain \"$second\".' \ + 'grep -q "$second" $first' +end + +function assert_file_contains_regex -a file pattern + __fish_spec_assert_generic \ + $file $pattern \ + 'Assertion $first content matches regex \"$second\" passed!' \ + 'Assertion failed: File \"$first\" does not contain a string matching the pattern \"$second\".' \ + 'grep -qE "$second" $first' +end + +function assert_not_file_contains -a file content + __fish_spec_assert_generic \ + $file $content \ + 'Assertion $first does not contain \"$content\" passed!' \ + 'Assertion failed: File \"$first\" contains \"$second\".' \ + 'not grep -q "$second" $first' +end + +function assert_not_file_contains_regex -a file pattern + __fish_spec_assert_generic \ + $file $pattern \ + 'Assertion $first content does not match regex \"$second\" passed!' \ + 'Assertion failed: File \"$first\" contains a string matching the pattern \"$second\".' \ + 'not grep -qE "$second" $first' +end + +function assert_in_array -a value + set -g __fish_spec_assertion_array $argv[2..-1] + __fish_spec_assert_generic \ + $value "$__fish_spec_assertion_array" \ + 'Assertion \"$first\" in [$second] passed!' \ + 'Assertion failed: Value \"$first\" is not in the array [$second].' \ + 'contains -- $first $__fish_spec_assertion_array' + set result $status + set -e __fish_spec_assertion_array + return $result +end + +function assert_not_in_array -a value + set -g __fish_spec_assertion_array $argv[2..-1] + __fish_spec_assert_generic \ + $value "$__fish_spec_assertion_array" \ + 'Assertion \"$first\" not in [$second] passed!' \ + 'Assertion failed: Value \"$first\" is in the array [$second].' \ + 'not contains -- $first $__fish_spec_assertion_array' + set result $status + set -e __fish_spec_assertion_array + return $result +end diff --git a/pkg/fish-spec/framework/color.fish b/pkg/fish-spec/framework/color.fish new file mode 100644 index 0000000..ad59deb --- /dev/null +++ b/pkg/fish-spec/framework/color.fish @@ -0,0 +1,39 @@ +function __fish_spec.color.echo.success + set_color -o green + echo $argv + set_color normal +end + +function __fish_spec.color.echo.failure + set_color -o red + echo $argv + set_color normal +end + +function __fish_spec.color.echo.mixed + set_color -o yellow + echo $argv + set_color normal +end + +function __fish_spec.color.echo.info + set_color -o cyan + echo $argv + set_color normal +end + +function __fish_spec.color.echo-n.info + echo -n (set_color -o cyan)$argv(set_color normal) +end + +function __fish_spec.color.echo.autocolor -a total failed + if test $total -eq $failed -a $total -eq 0 + __fish_spec.color.echo.success $argv[3..-1] + else if test $total -eq $failed + __fish_spec.color.echo.failure $argv[3..-1] + else if test $failed -gt 0 + __fish_spec.color.echo.mixed $argv[3..-1] + else + __fish_spec.color.echo.success $argv[3..-1] + end +end diff --git a/pkg/fish-spec/functions/assert.error_message.fish b/pkg/fish-spec/functions/assert.error_message.fish deleted file mode 100644 index cac1716..0000000 --- a/pkg/fish-spec/functions/assert.error_message.fish +++ /dev/null @@ -1,31 +0,0 @@ -function assert.error_message - set -l number_of_arguments (count $argv) - - switch $argv[1] - case ! - switch $number_of_arguments - case 3 - set operator (assert.expand_operator $argv[2]) - set actual $argv[3] - echo "Expected result to not be $operator but it was $actual" - case 4 - set expected $argv[2] - set operator "not" (assert.expand_operator $argv[3]) - set actual $argv[4] - echo "Expected result to $operator $expected but it was $actual" - case \* - return 1 - end - case \-\* - test $number_of_arguments != 2; and return 1 - set operator (assert.expand_operator $argv[1]) - set actual $argv[2] - echo "Expected result to be $operator but it was $actual" - case \* - test $number_of_arguments != 3; and return 1 - set expected $argv[1] - set operator (assert.expand_operator $argv[2]) - set actual $argv[3] - echo "Expected result to $operator $expected but it was $actual" - end -end diff --git a/pkg/fish-spec/functions/assert.expand_operator.fish b/pkg/fish-spec/functions/assert.expand_operator.fish deleted file mode 100644 index 2ad7d73..0000000 --- a/pkg/fish-spec/functions/assert.expand_operator.fish +++ /dev/null @@ -1,10 +0,0 @@ -function assert.expand_operator -a operator - switch $operator - case = - echo equals - case \-z - echo empty - case \* - echo $operator - end -end diff --git a/pkg/fish-spec/functions/assert.fish b/pkg/fish-spec/functions/assert.fish deleted file mode 100644 index f515964..0000000 --- a/pkg/fish-spec/functions/assert.fish +++ /dev/null @@ -1,9 +0,0 @@ -function assert --wraps test - if builtin test $argv - emit assertion_success - else - set -l assertion_status $status - emit assertion_error (assert.error_message $argv) - return $assertion_status - end -end diff --git a/pkg/fish-spec/functions/fish-spec.fish b/pkg/fish-spec/functions/fish-spec.fish index b3f8e31..8599e60 100644 --- a/pkg/fish-spec/functions/fish-spec.fish +++ b/pkg/fish-spec/functions/fish-spec.fish @@ -1,67 +1,103 @@ function fish-spec + # set up fish-spec set -g __fish_spec_dir (dirname (dirname (status -f))) - - # Source formatter - source $__fish_spec_dir/basic_formatter.fish - - # Reset internal variables - set -e __any_spec_failed - - # Load each spec file - for spec_file in spec/*_spec.fish - source $spec_file + for file in $__fish_spec_dir/framework/*.fish + source $file end - # Load helper file - source spec/helper.fish 2> /dev/null + # reset global assertion counters + set -g __fish_spec_failed_assertions 0 + set -g __fish_spec_total_assertions 0 - emit all_specs_init - - # Run all specs - __fish-spec.run_all_specs - - emit all_specs_finished - - not set -q __any_spec_failed -end - -function __fish-spec.run_all_specs - for suite in (functions -n | grep describe_) - __fish-spec.run_suite $suite - functions -e $suite - end -end - -function __fish-spec.run_suite -a suite_name - # This gets the list of specs that were defined on the test suite by - # comparing the functions names before and after the evaluation of the test suite. - set -l specs (begin - functions -n | grep it_ - eval $suite_name >/dev/null - functions -n | grep it_ - end | sort | uniq -u) - - functions -q before_all; and before_all - - for spec in $specs - emit spec_init $spec - functions -q before_each; and before_each - eval $spec - functions -q after_each; and after_each - emit spec_finished $spec - end - - functions -q after_all; and after_all - - functions -e before_all before_each after_each after_all -end - -function __fish-spec.current_time - if test (uname) = 'Darwin' - set filename 'epoch.osx' + if test "$argv" = "" + set test_files spec/*_spec.fish else - set filename 'epoch.linux' + set test_files $argv end - eval $__fish_spec_dir/utils/$filename + for test_file in $test_files + __fish_spec_run_tests_in_file $test_file + end + + # Global summary + echo + __fish_spec.color.echo.autocolor $__fish_spec_total_assertions $__fish_spec_failed_assertions "Test complete: $__fish_spec_total_assertions assertions run, $__fish_spec_failed_assertions failed." + if test $__fish_spec_failed_assertions -gt 0 + return 1 + end +end + +function __fish_spec_run_tests_in_file -a test_file + # reset per file assertion counters + set -g __fish_spec_failed_assertions_in_file 0 + set -g __fish_spec_total_assertions_in_file 0 + set -g __fish_spec_last_assertion_failed no + + __fish_spec.color.echo.info "Running tests in $test_file..." + source $test_file + + for suite in (functions | string match -r '^describe_.*') + __fish_spec_run_tests_in_suite $suite + end + + functions -e (functions | string match -r '^(describe_.*)$') + + # File-level summary + echo + __fish_spec.color.echo.autocolor $__fish_spec_total_assertions_in_file $__fish_spec_failed_assertions_in_file "Summary for $test_file: $__fish_spec_total_assertions_in_file assertions, $__fish_spec_failed_assertions_in_file failed." + echo +end + +function __fish_spec_run_tests_in_suite -a suite + __fish_spec.color.echo.info (string replace 'describe_' 'DESCRIBE ' $suite | string replace '_' ' ') + $suite + + if functions --query before_all + before_all + end + + for test_func in (functions | string match -r '^it_.*' | sort) + __fish_spec_run_test_function $test_func + end + + set __fish_spec_failed_assertions (math $__fish_spec_failed_assertions + $__fish_spec_failed_assertions_in_file) + set __fish_spec_total_assertions (math $__fish_spec_total_assertions + $__fish_spec_total_assertions_in_file) + + if functions --query after_all + after_all + end + + # Cleanup describe-scoped functions + functions -e (functions | string match -r '^(before_all|after_all|before_each|after_each|it_.*)$') +end + +function __fish_spec_run_test_function -a test_func + set test_func_human_readable (string replace 'it_' 'IT ' $test_func | string replace -a '_' ' ') + __fish_spec.color.echo-n.info "⏳ $test_func_human_readable" + + if functions --query before_each + set -l before_each_output (before_each 2>&1 | string collect) + end + + set -l test_func_output ($test_func 2>&1 | string collect) + set result $status + + if functions --query after_each + set -l before_each_output (before_each 2>&1 | string collect) + end + + if test $__fish_spec_last_assertion_failed = no + __fish_spec.color.echo.success \r"✅ $test_func_human_readable passed!" + if test "$FISH_SPEC_VERBOSE" = 1 + test -n "$before_each_output" && echo $before_each_output + test -n "$test_func_output" && echo $test_func_output + test -n "$after_each_output" && echo $after_each_output + end + else + __fish_spec.color.echo.failure \r"❌ $test_func_human_readable failed." + test -n "$before_each_output" && echo $before_each_output + test -n "$test_func_output" && echo $test_func_output + test -n "$after_each_output" && echo $after_each_output + set __fish_spec_last_assertion_failed no + end end diff --git a/pkg/fish-spec/spec/assert_error_message_spec.fish b/pkg/fish-spec/spec/assert_error_message_spec.fish deleted file mode 100644 index bfc7ad2..0000000 --- a/pkg/fish-spec/spec/assert_error_message_spec.fish +++ /dev/null @@ -1,54 +0,0 @@ -function describe_assert_error_message - function before_each - set -g __current_spec_quiet - end - - function after_each - set -e __current_spec_quiet - end - - function it_has_no_output_when_the_test_succeeds - assert 1 = 1 - - # Reset test status - set -e __current_spec_status - - assert -z "$__current_spec_output" - end - - function it_supports_unary_operators - assert -z "abc" - - # Reset test status - set -e __current_spec_status - - assert 'Expected result to be empty but it was abc' = "$__current_spec_output" - end - - function it_supports_binary_operators - assert 1 = 2 - - # Reset test status - set -e __current_spec_status - - assert 'Expected result to equals 1 but it was 2' = "$__current_spec_output" - end - - function it_supports_inversion_on_unary_operators - assert ! -z "" - - # Reset test status - set -e __current_spec_status - - assert 'Expected result to not be empty but it was ' = "$__current_spec_output" - end - - function it_supports_inversion_on_binary_operators - assert ! 1 = 1 - - # Reset test status - set -e __current_spec_status - - assert 'Expected result to not equals 1 but it was 1' = "$__current_spec_output" - end -end diff --git a/pkg/fish-spec/spec/empty_spec.fish b/pkg/fish-spec/spec/empty_spec.fish new file mode 100644 index 0000000..e69de29 diff --git a/pkg/fish-spec/spec/results_spec.fish b/pkg/fish-spec/spec/results_spec.fish index eaa47cd..7e1a0cf 100644 --- a/pkg/fish-spec/spec/results_spec.fish +++ b/pkg/fish-spec/spec/results_spec.fish @@ -2,38 +2,30 @@ function describe_results function it_succeeds_when_single_assertion_succeeds assert 1 = 1 - assert success = "$__current_spec_status" + assert 0 = $status end function it_succeeds_when_multiple_assertion_succeeds assert 1 = 1 assert 2 = 2 - - assert success = "$__current_spec_status" end function it_fails_when_single_assertion_fails - set -g __fish_spec_output "quiet" - + set previous_assertion_counter $__fish_spec_failed_assertions_in_file assert 1 = 2 - set -l spec_status $__current_spec_status - - # Reset internals - set -e __current_spec_status - - assert error = "$spec_status" + assert_exit_code 1 + echo decrement failed assertion counter so tests pass as expected + set __fish_spec_failed_assertions_in_file (math $__fish_spec_failed_assertions_in_file - 1) + assert_equal $previous_assertion_counter $__fish_spec_failed_assertions_in_file end function it_fails_when_one_of_the_assertions_fails - set -g __fish_spec_output "quiet" - + set previous_assertion_counter $__fish_spec_failed_assertions_in_file assert 1 = 2 + assert_exit_code 1 assert 2 = 2 - set -l spec_status $__current_spec_status - - # Reset internals - set -e __current_spec_status - - assert error = "$spec_status" + echo decrement failed assertion counter so tests pass as expected + set __fish_spec_failed_assertions_in_file (math $__fish_spec_failed_assertions_in_file - 1) + assert_equal $previous_assertion_counter $__fish_spec_failed_assertions_in_file end end diff --git a/pkg/fish-spec/utils/epoch.c b/pkg/fish-spec/utils/epoch.c deleted file mode 100644 index 4daaf2b..0000000 --- a/pkg/fish-spec/utils/epoch.c +++ /dev/null @@ -1,10 +0,0 @@ -#include -#include - -int main(int argc, char** argv) { - struct timeval time_struct; - gettimeofday(&time_struct, 0); - printf("%lld", (time_struct.tv_sec * 1000ll) + (time_struct.tv_usec / 1000ll)); - - return 0; -} diff --git a/pkg/fish-spec/utils/epoch.linux b/pkg/fish-spec/utils/epoch.linux deleted file mode 100755 index 3898514e7a8c4fb0a9c12ccfbb570508a4562bc2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6832 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 diff --git a/pkg/fish-spec/utils/epoch.osx b/pkg/fish-spec/utils/epoch.osx deleted file mode 100755 index 3d27ae9be2e6744fb1a69fd7af0e4c5147965fff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8496 zcmeHMO=uHA7@e(uMT@4OQqe*bBkG~8;z1B0kuGjA_){y0phMDbO(022vcXmq0;PpT z3b_b+^<2cOH$hP=f<1Zikc$#Qu{Vo|@x9G#vYV=RVLq6A^Jczz`_0=KnC!g!@%7gh zA&d<|RJw!^J5aM*tt8OVBd&X(UcJi%m$7Il*S0Th3+u;P2Ae6G?l+&eFQzzdI2tvLd72#ul zK)2#+=SM!7v2)XQ5kZ}NImLHS5fD@NmaWTgyyO(Kg_|m%ldr1ys1c1gXd!NNNLeo2 z$`&SMwlF#6;qd!-p!oRCX~dlz&7S73ly*i=7E^iK$6>yj;_Fj`h_TlGYFsCE6e))j zV~Ic*)xTEW1{6`? z!|)b7<2WbwSAe-@>hOHm+fXi|1dXvQ!FdGxSzn2^_hzsU+m0!D`)06QDh}qd>A{KF z+=L3+3(q{#ja~1%GN%qLd|Mt`dNfeuzJPQ{XscI_`j~An%%#F{+}AIgIp4M^tb>CRoa*eg* zxLJ424@vi#${a;&9KG>)0S^=$qRzNGD70?Q31+)TM0j+>m zKr5gX&-{V*=CFBL^q6eGQHdDC{BY~G%loJh^Gtq*O} zxRiD#fs`2%_laFHpON;AJzjQf+<~V^vp=887DTLhk+|Bg!u<-HcNpG{pZC>bw}+eG tIQ(xQ@U1TvyblcG;~lv9nATlu+{aPe;I7Y2dbx$?=g(}N9(a-vzX3(^_tF3W diff --git a/pkg/omf/spec/basic_spec.fish b/pkg/omf/spec/basic_spec.fish index e5d393c..969bdd7 100644 --- a/pkg/omf/spec/basic_spec.fish +++ b/pkg/omf/spec/basic_spec.fish @@ -3,6 +3,10 @@ function describe_basic_tests set -gx CI WORKAROUND end + function before_all + set -e CI + end + function it_has_a_help_command set -l output (omf help) echo $output | grep -Eq "cd.+Change to root or package directory" diff --git a/pkg/omf/spec/omf_list_spec.fish b/pkg/omf/spec/omf_list_spec.fish index 3a0d2aa..bf7eaba 100644 --- a/pkg/omf/spec/omf_list_spec.fish +++ b/pkg/omf/spec/omf_list_spec.fish @@ -3,6 +3,10 @@ function describe_omf_list_tests set -gx CI WORKAROUND end + function before_all + set -e CI + end + function it_can_list_plugins set -l list_output (omf list -p) assert 0 = $status diff --git a/pkg/omf/spec/omf_packages_spec.fish b/pkg/omf/spec/omf_packages_spec.fish index 8011518..e0dd5ab 100644 --- a/pkg/omf/spec/omf_packages_spec.fish +++ b/pkg/omf/spec/omf_packages_spec.fish @@ -3,6 +3,10 @@ function describe_omf_packages_tests set -gx CI WORKAROUND end + function before_all + set -e CI + end + function it_can_extract_name_from_name set -l output (omf.packages.name foo) assert 0 = $status