bash-it icon indicating copy to clipboard operation
bash-it copied to clipboard

DRAFT: BATS: unofficial strict mode

Open gaelicWizard opened this issue 4 years ago • 1 comments

Description

This branch adds set -Eeuo pipefail to the bottom of setup(), so each test is run with extremely strict environment.

Motivation and Context

Hence Chapter 4. This will help to prevent regressions, as well as catch omissions that shellcheck misses (like unbound positional parameters).

How Has This Been Tested?

This is built in top of my precommit branch (#2033), so the *.bats tests themselves are already fairly tight, so this PR is just for actually applying the strictness to the main code.

Types of changes

  • [x] Bug fix (non-breaking change which fixes an issue)

Checklist:

  • [x] My code follows the code style of this project.
  • [ ] If my change requires a change to the documentation, I have updated the documentation accordingly.
  • [x] I have read the CONTRIBUTING document.
  • [x] If I have added a new file, I also added it to clean_files.txt and formatted it using lint_clean_files.sh.
  • [ ] I have added tests to cover my changes, and all the new and existing tests pass.

gaelicWizard avatar Jan 11 '22 08:01 gaelicWizard

tests are failing, this is not ready.

seefood avatar Apr 30 '25 11:04 seefood

seems abandoned for good...

seefood avatar Aug 10 '25 06:08 seefood