shunit2
shunit2 copied to clipboard
shUnit2 is a xUnit based unit test framework for Bourne based shell scripts.
This is an attempt to fix issue #112.
… relevant test
We now have an `assertContains`, but what I still miss is a RegEx-version of that, so I can (use case:) do `assertContainsRegEx "$archiveList" "^prefix1_"` or so and I get check...
``` What steps will reproduce the problem? $ zsh $ echo $SHLVL 2 $ . ~/src/shell/shunit2 $ echo $SHLVL 1 What is the expected output? What do you see instead?...
Add `assertStartsWith` and `assertEndsWith` to complement `assertContains` ( #98 ) If there is interest in this, I can submit a PR. Intent is to use POSIX Paramter Expansion (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02). On...
A very useful project, thank you. Some new assertions to consider: - assertFileExists - assertFileDoesNotExist - assertFileContains - assertFileDoesNotContain - assertDirectoryExists - assertDirectoryDoesNotExist
Ran into this while referencing the docs, but in the implementation it only allows 'none'. Maybe it's better to alter the docs to say 'none' rather than 'never', but that's...
Some advanced scripts include arrays and associative arrays. It is easy to compare them, just evaluate `declare -p var_name` on each side, then do assertEquals on the results.