From 0175c1c40f9567a401a986d85ab6d6f5365eec7a Mon Sep 17 00:00:00 2001 From: Malfurious Date: Mon, 23 Aug 2021 07:35:24 -0400 Subject: Remove unit tests I don't particularly wish to maintain these tests for a few reasons: * Many of them make assertions strictly about rendered text / UI * Many of them test external systems and touch the disk * There are platform-dependent details that complicate several tests. So, the tests are removed. Ideally, the main script is reworked into something simple enough it doesn't necessarily warrant heavy testing. Signed-off-by: Malfurious --- test/shunit/shunit2_test_helpers | 177 --------------------------------------- 1 file changed, 177 deletions(-) delete mode 100644 test/shunit/shunit2_test_helpers (limited to 'test/shunit/shunit2_test_helpers') diff --git a/test/shunit/shunit2_test_helpers b/test/shunit/shunit2_test_helpers deleted file mode 100644 index 82a0eef..0000000 --- a/test/shunit/shunit2_test_helpers +++ /dev/null @@ -1,177 +0,0 @@ -# $Id: shunit2_test_helpers 286 2008-11-24 21:42:34Z kate.ward@forestent.com $ -# vim:et:ft=sh:sts=2:sw=2 -# -# Copyright 2008 Kate Ward. All Rights Reserved. -# Released under the LGPL (GNU Lesser General Public License) -# -# Author: kate.ward@forestent.com (Kate Ward) -# -# shUnit2 unit test common functions - -# treat unset variables as an error when performing parameter expansion -set -u - -# set shwordsplit for zsh -[ -n "${ZSH_VERSION:-}" ] && setopt shwordsplit - -# -# constants -# - -# path to shUnit2 library. can be overridden by setting SHUNIT_INC -TH_SHUNIT=${SHUNIT_INC:-./shunit2} - -# configure debugging. set the DEBUG environment variable to any -# non-empty value to enable debug output, or TRACE to enable trace -# output. -TRACE=${TRACE:+'th_trace '} -[ -n "${TRACE}" ] && DEBUG=1 -[ -z "${TRACE}" ] && TRACE=':' - -DEBUG=${DEBUG:+'th_debug '} -[ -z "${DEBUG}" ] && DEBUG=':' - -# -# variables -# - -th_RANDOM=0 - -# -# functions -# - -# message functions -th_trace() { echo "${MY_NAME}:TRACE $@" >&2; } -th_debug() { echo "${MY_NAME}:DEBUG $@" >&2; } -th_info() { echo "${MY_NAME}:INFO $@" >&2; } -th_warn() { echo "${MY_NAME}:WARN $@" >&2; } -th_error() { echo "${MY_NAME}:ERROR $@" >&2; } -th_fatal() { echo "${MY_NAME}:FATAL $@" >&2; } - -# output subtest name -th_subtest() { echo " $@" >&2; } - -# generate a random number -th_generateRandom() -{ - tfgr_random=${th_RANDOM} - - while [ "${tfgr_random}" = "${th_RANDOM}" ]; do - if [ -n "${RANDOM:-}" ]; then - # $RANDOM works - tfgr_random=${RANDOM}${RANDOM}${RANDOM}$$ - elif [ -r '/dev/urandom' ]; then - tfgr_random=`od -vAn -N4 -tu4