Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions osht.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ done

function _osht_cleanup {
local rv=$?
# make sure we get latest value (possibly updated in sub-shell)
_osht_get_test_count
if [ -z "$_OSHT_PLANNED_TESTS" ]; then
_OSHT_PLANNED_TESTS=$_OSHT_CURRENT_TEST
echo "1..$_OSHT_PLANNED_TESTS"
Expand Down Expand Up @@ -172,6 +174,10 @@ function _osht_source_linenum {
echo "${parts[0]}"
}

function _osht_get_test_count {
_OSHT_CURRENT_TEST=$(cat $_OSHT_CURRENT_TEST_FILE)
}

function _osht_increment_test {
_OSHT_CURRENT_TEST=$(cat $_OSHT_CURRENT_TEST_FILE)
let _OSHT_CURRENT_TEST=_OSHT_CURRENT_TEST+1
Expand Down