Upload Tizen:Base source
[framework/base/util-linux-ng.git] / tests / ts / cal / 3m
1 #!/bin/bash
2
3 #
4 # Copyright (C) 2007 Karel Zak <kzak@redhat.com>
5 #
6 # This file is part of util-linux-ng.
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 #
18 TS_TOPDIR="$(dirname $0)/../.."
19 TS_DESC="3 months"
20
21 . $TS_TOPDIR/functions.sh
22 ts_init "$*"
23
24 set -o pipefail
25
26 USETERM=$( ts_has_option "useterm" "$*" )
27 MYTIME="27 09 2006"
28
29 [ "$USETERM" == "yes" ] && TS_VERBOSE="yes"
30 ts_log ""
31
32 ts_log "Gregorian - Monday-based week"
33 if [ "$USETERM" == "yes" ]; then
34          $TS_CMD_CAL -3m $MYTIME
35 fi
36 $TS_CMD_CAL -3m $MYTIME >> $TS_OUTPUT
37
38 ts_log "Gregorian - Sunday-based week"
39 if [ "$USETERM" == "yes" ]; then
40          $TS_CMD_CAL -3s $MYTIME
41 fi
42 $TS_CMD_CAL -3s $MYTIME >> $TS_OUTPUT
43
44
45 ts_log "Julian - Monday-based week"
46 if [ "$USETERM" == "yes" ]; then
47         $TS_CMD_CAL -3mj $MYTIME
48 fi
49 $TS_CMD_CAL -3mj $MYTIME >> $TS_OUTPUT
50
51 ts_log "Julian - Sunday-based week"
52 if [ "$USETERM" == "yes" ]; then
53          $TS_CMD_CAL -3sj $MYTIME
54 fi
55 $TS_CMD_CAL -3sj $MYTIME >> $TS_OUTPUT
56
57 ts_finalize
58