Skip to content

Deprecating the focus on posix sh compatibility #28

@ntnn

Description

@ntnn

The maintainers of sstephenson/bats made it clear that they wanted to use as much posix as possible.

While this makes sense in some cases (and would entirely be possible), I think that it doesn't fit the projects' scope.

  1. BATS stands for bash automated testing system
  2. The codebase uses features such as pipefail, which are not part of the POSIX sh spec (and likely won't be for the near future)

A negligible point is the cost of the additional calls to external programs, as modern machines don't have a problem with those ([ e.g. was an alias to test until recently in bash, instead of =~ grep or expr have to be used).

In general bash is more friendly to develop and read as a posix compliant test, e.g., does not allow for compounds like [ 1 -eq 0 || 0 -eq 0 ], which is a common construct to use.

I'd like a clear statement if this project intents to go full posix or full bash. I'd be fine with either way, but currently it is a mix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions