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
7 changes: 5 additions & 2 deletions shunit2
Original file line number Diff line number Diff line change
Expand Up @@ -1119,17 +1119,20 @@ _shunit_mktempDir() {
# Args:
# None
_shunit_mktempFunc() {
# Not every system provides /bin/sh, so resolve sh from PATH rather than
# hardcoding the stub interpreter.
_shunit_sh_=`command -v sh`
for _shunit_func_ in oneTimeSetUp oneTimeTearDown setUp tearDown suite noexec
do
_shunit_file_="${__shunit_tmpDir}/${_shunit_func_}"
command cat <<EOF >"${_shunit_file_}"
#! /bin/sh
#!${_shunit_sh_}
exit ${SHUNIT_TRUE}
EOF
command chmod +x "${_shunit_file_}"
done

unset _shunit_file_
unset _shunit_file_ _shunit_sh_
}

# Final cleanup function to leave things as we found them.
Expand Down