diff options
author | Sami Kerola | 2015-05-17 19:27:42 +0200 |
---|---|---|
committer | Karel Zak | 2015-05-18 11:41:48 +0200 |
commit | c5ad7b59acc8b12fa2c10624bbf12dc20910f88d (patch) | |
tree | cedfeb4a5dcd7ebaf7e243200647b9ab5021fecb /tests/ts/cal | |
parent | zramctl: add MEM-LIMIT, MEM-USED and MIGRATED columns (diff) | |
download | kernel-qcow2-util-linux-c5ad7b59acc8b12fa2c10624bbf12dc20910f88d.tar.gz kernel-qcow2-util-linux-c5ad7b59acc8b12fa2c10624bbf12dc20910f88d.tar.xz kernel-qcow2-util-linux-c5ad7b59acc8b12fa2c10624bbf12dc20910f88d.zip |
cal: fix January 1753 week number printout
Earlier output was clearly broken.
$ cal -w 1 1753
January 1753
Su Mo Tu We Th Fr Sa
51 1 2 3 4 5 6
52 7 8 9 10 11 12 13
52 14 15 16 17 18 19 20
52 21 22 23 24 25 26 27
52 28 29 30 31
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'tests/ts/cal')
-rwxr-xr-x | tests/ts/cal/jan1753 | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/ts/cal/jan1753 b/tests/ts/cal/jan1753 new file mode 100755 index 000000000..85dbf3530 --- /dev/null +++ b/tests/ts/cal/jan1753 @@ -0,0 +1,43 @@ +#!/bin/bash + +# This file is part of util-linux. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +TS_TOPDIR="${0%/*}/../.." +TS_DESC="January 1753" + +. $TS_TOPDIR/functions.sh +ts_init "$*" + +ts_check_test_command "$TS_CMD_CAL" + +export TERM=linux + +USETERM=$( ts_has_option "useterm" "$*" ) +MYMONTH="1 1753" + +[ "$USETERM" == "yes" ] && TS_VERBOSE="yes" +ts_log "" + +ts_log "Monday-based 1753 week numbers" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -m3w $MYMONTH +fi +$TS_CMD_CAL -m3w $MYMONTH >> $TS_OUTPUT + +ts_log "Sunday-based 1753 week numbers" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -3w $MYMONTH +fi +$TS_CMD_CAL -3w $MYMONTH >> $TS_OUTPUT + +ts_finalize |