summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2010-01-03 09:30:50 +0000
committerobrien <obrien@FreeBSD.org>2010-01-03 09:30:50 +0000
commit447a847b688697e17ae4c241fa311e84df8a9689 (patch)
treef16007e36a16ef104fe1c4dcab0e972486d4f98c /tools
parent07c66d81be83dbb250a9791c908eb3116d586557 (diff)
downloadFreeBSD-src-447a847b688697e17ae4c241fa311e84df8a9689.zip
FreeBSD-src-447a847b688697e17ae4c241fa311e84df8a9689.tar.gz
Allow to be driven by 'prove -r'.
Diffstat (limited to 'tools')
-rw-r--r--tools/regression/bin/date/regress.sh16
1 files changed, 10 insertions, 6 deletions
diff --git a/tools/regression/bin/date/regress.sh b/tools/regression/bin/date/regress.sh
index 463e49c..2eb2309 100644
--- a/tools/regression/bin/date/regress.sh
+++ b/tools/regression/bin/date/regress.sh
@@ -29,25 +29,29 @@ check()
A1=$2
A2=$3
- count=`expr ${count} + 1`
-
if [ -z "${A2}" ]; then A2=${A1}; fi
+ count=`expr ${count} + 1`
+
R=`date -r ${TEST1} +%${S}`
if [ "${R}" = "${A1}" ]; then
- echo "${count}a. ${S} - ok"
+ echo "ok ${count} - ${S}(a)"
else
- echo "${count}a. ${S} - not ok (got ${R}, expected ${A1})"
+ echo "no ok ${count} - ${S}(a) (got ${R}, expected ${A1})"
fi
+ count=`expr ${count} + 1`
+
R=`date -r ${TEST2} +%${S}`
if [ "${R}" = "${A2}" ]; then
- echo "${count}b. ${S} - ok"
+ echo "ok ${count} - ${S}(b)"
else
- echo "${count}b. ${S} - not ok (got ${R}, expected ${A2})"
+ echo "no ok ${count} - ${S}(b) (got ${R}, expected ${A2})"
fi
}
+echo "1..78"
+
check A Saturday Monday
check a Sat Mon
check B February November
OpenPOWER on IntegriCloud