./devel/shunit2, Unit test framework for Bourne based shell scripts

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 2.1.8, Package name: shunit2-2.1.8, Maintainer: pkgsrc-users

shUnit2 is a xUnit unit test framework for Bourne based shell scripts,
and it is designed to work in a similar manner to JUnit, PyUnit, etc.
If you have ever had the desire to write a unit test for a shell script,
shUnit2 can do the job.


Master sites:

Filesize: 51.229 KB

Version history: (Expand)


CVS history: (Expand)


   2023-02-14 16:08:42 by Amitai Schleier | Files touched by this commit (2)
Log message:
Update to 2.1.8. From the changelog:

# New features

Users can now define a custom prefix for test function names. The prefix
can be configured by defining a `SHUNIT_TEST_PREFIX` variable.

Colorized output, based on popular demand. shUnit2 output is now
colorized based on the result of the asserts.

# Changes and Enhancements

Shell commands in shUnit2 are prefixed with '\' so that they can be
stubbed in tests.

# Bug fixes

Syntax errors in functions are now treated as test failures.

Test now fail when `setup()` or `tearDown()` fail.

shUnit2 no longer exits with an 'OK' result if there were syntax errors
due to incorrect usage of the assert commands.

# Known bugs and issues

Zsh requires the `shwordsplit` option to be set. See the documentation
for examples of how to do this.

Line numbers in assert messages do not work properly with BASH 2.x.

The Bourne shell of Solaris, BASH 2.x, and Zsh 3.0.x do not properly
catch the SIGTERM signal. As such, shell interpreter failures due to
such things as unbound variables cannot be caught. (See
`shunit_test_misc.sh`)

shUnit2 does not work when the `-e` shell option is set (typically done
with `set -e`).

# Tested platforms

Tested OSes:

- Linux
- macOS

Tested shells:

- /bin/sh
- ash
- bash
- dash
- ksh
- pdksh
- zsh
   2021-10-26 12:20:11 by Nia Alarie | Files touched by this commit (3016)
Log message:
archivers: Replace RMD160 checksums with BLAKE2s checksums

All checksums have been double-checked against existing RMD160 and
SHA512 hashes

Could not be committed due to merge conflict:
devel/py-traitlets/distinfo

The following distfiles were unfetchable (note: some may be only fetched
conditionally):

./devel/pvs/distinfo pvs-3.2-solaris.tgz
./devel/eclipse/distinfo eclipse-sourceBuild-srcIncluded-3.0.1.zip
   2021-10-07 15:44:44 by Nia Alarie | Files touched by this commit (3017)
Log message:
devel: Remove SHA1 hashes for distfiles
   2017-07-04 12:06:56 by Jonathan Perkin | Files touched by this commit (4)
Log message:
Import shunit2-2.1.6 as devel/shunit2.

shUnit2 is a xUnit unit test framework for Bourne based shell scripts,
and it is designed to work in a similar manner to JUnit, PyUnit, etc.
If you have ever had the desire to write a unit test for a shell script,
shUnit2 can do the job.