24 lines
425 B
Bash
Executable File
24 lines
425 B
Bash
Executable File
_testPassCount=0;
|
|
_testTotalCount=0;
|
|
|
|
function it() {
|
|
local exitCode=$?;
|
|
local message=$1;
|
|
local status;
|
|
|
|
_testTotalCount=$((_testTotalCount+1));
|
|
|
|
if [ "$exitCode" -eq 0 ]; then
|
|
status='✓';
|
|
_testPassCount=$((_testPassCount+1));
|
|
else
|
|
status='✗';
|
|
fi;
|
|
|
|
printf '%s %s\n' "$status" "$message";
|
|
}
|
|
|
|
function testSummary() {
|
|
printf 'Passed: %s of %s tests\n' "$_testPassCount" "$_testTotalCount";
|
|
}
|