You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
684 B
40 lines
684 B
#
|
|
|
|
intent="testing all subroutines ..."
|
|
|
|
if echo -n "\e" | grep -q -e 'e'; then
|
|
e="-e" # bash needs a -e !
|
|
fi
|
|
# colors : [see also](https://en.wikipedia.org/wiki/ANSI_escape_code)
|
|
nc=$(echo -n $e "\e[0m")
|
|
|
|
export SITE='..';
|
|
cp -p test.log test.log.1
|
|
# savestdout and stderr
|
|
exec 3>&1 4>&2
|
|
exec > test.log
|
|
exec 2>&1
|
|
echo "--- ${0##*/}"
|
|
for tc in *.t; do
|
|
echo "tc: $tc"
|
|
perl $tc
|
|
echo '---'
|
|
done
|
|
echo '...'
|
|
|
|
# restore stdout and stderr
|
|
exec 1>&3 2>&4 3>&- 4>&-
|
|
|
|
ipfs add -n -q test.log
|
|
diff test.log test.log.1
|
|
if [ $? = 0 ]; then
|
|
green=$(echo -n $e "\e[1;32m")
|
|
echo "${green}PASS${nc}"
|
|
else
|
|
red=$(echo -n $e "\e[31m")
|
|
echo "${red}FAIL${nc}"
|
|
exit 252
|
|
fi
|
|
|
|
|
|
true;
|