Skip to content

macOS zsh: sourcing ./shunit2 throws an error: _shunit_fatal:1: command not found: echo -e #147

@alexbigkid

Description

@alexbigkid

Hi Kate,

Just discovered your GIT repo. Great work! Until now I always tested shell scripts manually.
Trying to write few tests with your unit test framework.

Having a problem to run it on zsh shell though. I traced it down to ./shunit2 line 40-44.
when sourcing the the lib with ". ./shunit2" it throws an error: _shunit_fatal:1: command not found: echo -e

I am running on macOS BigSur 11.5.2, zsh version 5.8. Here are the details:
$ uname -mprsv
Darwin 20.6.0 Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:31 PDT 2021; root:xnu-7195.141.2~5/RELEASE_X86_64 x86_64 i386

shell name: zsh
shell version: 5.8

--- Executing the 'sbxCommon' test suite ---
_shunit_fatal:1: command not found: echo -e

the bash and sh is running fine though

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions