zopencommunity / metaport

zopen package manager
Apache License 2.0
1 stars 2 forks source link

basic changes to enable us to write new test cases for zopen #7

Closed MikeFultonDev closed 1 year ago

MikeFultonDev commented 1 year ago

light-weight test framework that lets people independently add tests of the form zopen_check_xxx to the test suite.

Moved 'zopen_check_build' code into it's own testcase as a 'sample' and created a simple README

MikeFultonDev commented 1 year ago

@HarithaIBM and @devonianteuchter i hit 'merge' too fast - i would like your review too since the 4 of us will be doing a bunch of adding of tests (and hopefully others too!)

HarithaIBM commented 1 year ago

Sure Mike

DevonianTeuchter commented 1 year ago

LGTM! Is there plans for a set of "standard" test functions to save each test implementing their own and being more consistent with how other test frameworks operate (or even utilise one of them like shunit2/shellspec). For example (and by no means exhaustively tested as on my phone!!) "assertStringEquals() { [ -n "$1" ] && [ -n "$2 ] && [ "$1" = "$2" ] && return 0 || echo "Assert failure: Strings not equal '$1' vs '$2'" && exit 8 }" so then a test could have assertStringEquals "String A" "String B" assertStringEquals "String C" "String B" rather than lots of boiler plate code?

MikeFultonDev commented 1 year ago

Makes sense. Do you want to create an include directory and put the functions there?