_output_status "$TEST_NAME" ""
fi
+ (
local key value
while IFS= read -r key; do
if [[ $key =~ ^date|status|reason|exit_status$ ]]; then
continue
fi
value="${LAST_TEST_RUN["$key"]}"
- echo " ${key} ${value} ..."
+ printf ' %s\t%s\t...\n' "${key}" "${value}"
done < <(printf '%s\n' "${!LAST_TEST_RUN[@]}" | sort)
+ ) | column -t -s $'\t'
}
_output_test_run() {
_output_status "$TEST_NAME" "${TEST_RUN[status]}ed"
fi
+ (
local key last_value value
while IFS= read -r key; do
if [[ $key =~ ^date|status|reason|exit_status$ ]]; then
fi
last_value="${LAST_TEST_RUN["$key"]}"
value="${TEST_RUN["$key"]}"
- echo " ${key} ${last_value} ... ${value}"
+ printf ' %s\t%s\t...\t%s\n' "$key" "$last_value" "$value"
done < <(printf '%s\n' "${!LAST_TEST_RUN[@]}" | sort)
while IFS= read -r key; do
continue
fi
value="${TEST_RUN["$key"]}"
- echo " ${key} ... ${value}"
+ printf ' %s\t\t...\t%s\n' "$key" "$value"
done < <(printf '%s\n' "${!TEST_RUN[@]}" | sort)
+ ) | column -t -s $'\t'
}
_cleanup() {
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-DESCRIPTION="record pid"
+DESCRIPTION="record pid and random junk"
test() {
echo "Running ${TEST_NAME}"
+ sleep 1
TEST_RUN[pid]=$$
+ TEST_RUN[random]="$(od -N $((4 * (RANDOM % 4))) -An -vtx1 /dev/urandom | tr -d ' \n')"
+ TEST_RUN[$$]=hello
echo "Test complete"
}