summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2010-03-21 21:33:21 +0000
committeredwin <edwin@FreeBSD.org>2010-03-21 21:33:21 +0000
commit9792f6e953c151c5df861e4c49cf9ed1d3762f38 (patch)
tree80c16fd52abe3a449fc3567be35758dc7ae6e2f0 /tools
parent78363cb37359be16ff42d36fdd2cdf51b9f33ae0 (diff)
downloadFreeBSD-src-9792f6e953c151c5df861e4c49cf9ed1d3762f38.zip
FreeBSD-src-9792f6e953c151c5df861e4c49cf9ed1d3762f38.tar.gz
Replace -b with -C and -B (as proposed by Alexander).
Add -3, -A and -B to the usage. Update regression test for the new parameters.
Diffstat (limited to 'tools')
-rw-r--r--tools/regression/usr.bin/ncal/regress.sh71
1 files changed, 37 insertions, 34 deletions
diff --git a/tools/regression/usr.bin/ncal/regress.sh b/tools/regression/usr.bin/ncal/regress.sh
index 7657e83..3dc188d 100644
--- a/tools/regression/usr.bin/ncal/regress.sh
+++ b/tools/regression/usr.bin/ncal/regress.sh
@@ -1,7 +1,8 @@
# $FreeBSD$
CAL_BIN="ncal"
-CAL="${CAL_BIN}"
+CAL="${CAL_BIN} -C"
+NCAL="${CAL_BIN} -N"
YEARS="2008 2009 2010 2011"
ONEYEAR="2009"
@@ -18,13 +19,13 @@ echo 1..16
for y in ${YEARS}; do
# Regular calendar, Month days, No-highlight
- REGRESSION_TEST(`r-y${y}-md-nhl', `$CAL -h ${y}')
+ REGRESSION_TEST(`r-y${y}-md-nhl', `$NCAL -h ${y}')
# Backwards calendar, Month days, No-highlight
- REGRESSION_TEST(`b-y${y}-md-nhl', `$CAL -bh ${y}')
+ REGRESSION_TEST(`b-y${y}-md-nhl', `$CAL -h ${y}')
# Regular calendar, Julian days, No-highlight
- REGRESSION_TEST(`r-y${y}-jd-nhl', `$CAL -jh ${y}')
+ REGRESSION_TEST(`r-y${y}-jd-nhl', `$NCAL -jh ${y}')
# Backwards calendar, Julian days, No-highlight
- REGRESSION_TEST(`b-y${y}-jd-nhl', `$CAL -jbh ${y}')
+ REGRESSION_TEST(`b-y${y}-jd-nhl', `$CAL -jh ${y}')
done
# 3 month calendars
@@ -33,13 +34,15 @@ echo 17 .. 29
for m in $(jot -w %02d 12); do
# Regular calendar, Month days, No-highlight
- REGRESSION_TEST(`r-3m${ONEYEAR}${m}-md-nhl', `$CAL -h3 ${m} ${ONEYEAR}')
+ REGRESSION_TEST(`r-3m${ONEYEAR}${m}-md-nhl',
+ `$NCAL -h3 ${m} ${ONEYEAR}')
# Backwards calendar, Month days, No-highlight
- REGRESSION_TEST(`b-3m${ONEYEAR}${m}-md-nhl', `$CAL -bh3 ${m} ${ONEYEAR}')
+ REGRESSION_TEST(`b-3m${ONEYEAR}${m}-md-nhl', `$CAL -h3 ${m} ${ONEYEAR}')
# Regular calendar, Julian days, No-highlight
- REGRESSION_TEST(`r-3m${ONEYEAR}${m}-jd-nhl', `$CAL -jh3 ${m} ${ONEYEAR}')
+ REGRESSION_TEST(`r-3m${ONEYEAR}${m}-jd-nhl',
+ `$NCAL -jh3 ${m} ${ONEYEAR}')
# Backwards calendar, Julian days, No-highlight
- REGRESSION_TEST(`b-3m${ONEYEAR}${m}-jd-nhl', `$CAL -jbh3 ${m} ${ONEYEAR}')
+ REGRESSION_TEST(`b-3m${ONEYEAR}${m}-jd-nhl', `$CAL -jh3 ${m} ${ONEYEAR}')
done
#
@@ -47,33 +50,33 @@ done
#
# These should fail
-REGRESSION_TEST(`f-3y-nhl', `$CAL -3 -y 2>&1')
-REGRESSION_TEST(`f-3A-nhl', `$CAL -3 -A 3 2>&1')
-REGRESSION_TEST(`f-3B-nhl', `$CAL -3 -B 3 2>&1')
-REGRESSION_TEST(`f-3gy-nhl', `$CAL -3 2008 2>&1')
-REGRESSION_TEST(`f-3AB-nhl', `$CAL -3 -A 3 -B 3 2>&1')
-REGRESSION_TEST(`f-mgm-nhl', `$CAL -m 3 2 2008 2>&1')
-REGRESSION_TEST(`f-ym-nhl', `$CAL -y -m 2 2>&1')
-REGRESSION_TEST(`f-ygm-nhl', `$CAL -y 2 2008 2>&1')
-REGRESSION_TEST(`f-yA-nhl', `$CAL -y -A 3 2>&1')
-REGRESSION_TEST(`f-yB-nhl', `$CAL -y -B 3 2>&1')
-REGRESSION_TEST(`f-yAB-nhl', `$CAL -y -A 3 -B 3 2>&1')
+REGRESSION_TEST(`f-3y-nhl', `$NCAL -3 -y 2>&1')
+REGRESSION_TEST(`f-3A-nhl', `$NCAL -3 -A 3 2>&1')
+REGRESSION_TEST(`f-3B-nhl', `$NCAL -3 -B 3 2>&1')
+REGRESSION_TEST(`f-3gy-nhl', `$NCAL -3 2008 2>&1')
+REGRESSION_TEST(`f-3AB-nhl', `$NCAL -3 -A 3 -B 3 2>&1')
+REGRESSION_TEST(`f-mgm-nhl', `$NCAL -m 3 2 2008 2>&1')
+REGRESSION_TEST(`f-ym-nhl', `$NCAL -y -m 2 2>&1')
+REGRESSION_TEST(`f-ygm-nhl', `$NCAL -y 2 2008 2>&1')
+REGRESSION_TEST(`f-yA-nhl', `$NCAL -y -A 3 2>&1')
+REGRESSION_TEST(`f-yB-nhl', `$NCAL -y -B 3 2>&1')
+REGRESSION_TEST(`f-yAB-nhl', `$NCAL -y -A 3 -B 3 2>&1')
# These should be successful
-REGRESSION_TEST(`s-b-3-nhl', `$CAL -b -d 2008.03 -3')
-REGRESSION_TEST(`s-b-A-nhl', `$CAL -b -d 2008.03 -A 1')
-REGRESSION_TEST(`s-b-B-nhl', `$CAL -b -d 2008.03 -B 1')
-REGRESSION_TEST(`s-b-AB-nhl', `$CAL -b -d 2008.03 -A 1 -B 1')
-REGRESSION_TEST(`s-b-m-nhl', `$CAL -b -d 2008.03 -m 1')
-REGRESSION_TEST(`s-b-mgy-nhl', `$CAL -b -d 2008.03 -m 1 2007')
-REGRESSION_TEST(`s-b-gmgy-nhl', `$CAL -b -d 2008.03 1 2007')
-REGRESSION_TEST(`s-r-3-nhl', `$CAL -d 2008.03 -3')
-REGRESSION_TEST(`s-r-A-nhl', `$CAL -d 2008.03 -A 1')
-REGRESSION_TEST(`s-r-B-nhl', `$CAL -d 2008.03 -B 1')
-REGRESSION_TEST(`s-r-AB-nhl', `$CAL -d 2008.03 -A 1 -B 1')
-REGRESSION_TEST(`s-r-m-nhl', `$CAL -d 2008.03 -m 1')
-REGRESSION_TEST(`s-r-mgy-nhl', `$CAL -d 2008.03 -m 1 2007')
-REGRESSION_TEST(`s-r-gmgy-nhl', `$CAL -d 2008.03 1 2007')
+REGRESSION_TEST(`s-b-3-nhl', `$CAL -d 2008.03 -3')
+REGRESSION_TEST(`s-b-A-nhl', `$CAL -d 2008.03 -A 1')
+REGRESSION_TEST(`s-b-B-nhl', `$CAL -d 2008.03 -B 1')
+REGRESSION_TEST(`s-b-AB-nhl', `$CAL -d 2008.03 -A 1 -B 1')
+REGRESSION_TEST(`s-b-m-nhl', `$CAL -d 2008.03 -m 1')
+REGRESSION_TEST(`s-b-mgy-nhl', `$CAL -d 2008.03 -m 1 2007')
+REGRESSION_TEST(`s-b-gmgy-nhl', `$CAL -d 2008.03 1 2007')
+REGRESSION_TEST(`s-r-3-nhl', `$NCAL -d 2008.03 -3')
+REGRESSION_TEST(`s-r-A-nhl', `$NCAL -d 2008.03 -A 1')
+REGRESSION_TEST(`s-r-B-nhl', `$NCAL -d 2008.03 -B 1')
+REGRESSION_TEST(`s-r-AB-nhl', `$NCAL -d 2008.03 -A 1 -B 1')
+REGRESSION_TEST(`s-r-m-nhl', `$NCAL -d 2008.03 -m 1')
+REGRESSION_TEST(`s-r-mgy-nhl', `$NCAL -d 2008.03 -m 1 2007')
+REGRESSION_TEST(`s-r-gmgy-nhl', `$NCAL -d 2008.03 1 2007')
REGRESSION_END()
OpenPOWER on IntegriCloud