]> git.ipfire.org Git - thirdparty/util-linux.git/blame - tests/ts/cal/yearw
tests: merge 1m and 3m cal(1) tests
[thirdparty/util-linux.git] / tests / ts / cal / yearw
CommitLineData
db652f61
TK
1#!/bin/bash
2
3#
4# Copyright (C) 2007 Karel Zak <kzak@redhat.com>
5#
6# This file is part of util-linux.
7#
8# This file is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2 of the License, or
11# (at your option) any later version.
12#
13# This file is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
e130ce53 18TS_TOPDIR="${0%/*}/../.."
db652f61
TK
19TS_DESC="year with week numbers"
20
21. $TS_TOPDIR/functions.sh
22ts_init "$*"
23
2f791546
SK
24ts_check_test_command "$TS_CMD_CAL"
25
e0e9ff9e 26export TERM=linux
db652f61
TK
27
28USETERM=$( ts_has_option "useterm" "$*" )
29MYTIME="29 11 2006"
30
31[ "$USETERM" == "yes" ] && TS_VERBOSE="yes"
32ts_log ""
33
34ts_log "Gregorian - Monday-based week with week numbers"
35if [ "$USETERM" == "yes" ]; then
36 $TS_CMD_CAL -ymw $MYTIME
37fi
38$TS_CMD_CAL -ymw $MYTIME >> $TS_OUTPUT
39
40ts_log "Gregorian - Sunday-based week with week numbers"
41if [ "$USETERM" == "yes" ]; then
42 $TS_CMD_CAL -ysw $MYTIME
43fi
44$TS_CMD_CAL -ysw $MYTIME >> $TS_OUTPUT
45
46
47ts_log "Julian - Monday-based week with week numbers"
48if [ "$USETERM" == "yes" ]; then
49 $TS_CMD_CAL -ymjw $MYTIME
50fi
51$TS_CMD_CAL -ymjw $MYTIME >> $TS_OUTPUT
52
53ts_log "Julian - Sunday-based week with week numbers"
54if [ "$USETERM" == "yes" ]; then
55 $TS_CMD_CAL -ysjw $MYTIME
56fi
57$TS_CMD_CAL -ysjw $MYTIME >> $TS_OUTPUT
58
59ts_finalize
60