diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2012-11-02 20:15:39 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2012-11-02 20:15:39 +0400 |
commit | b13154de3eca5ba28fbb4854d916cd0be5febeed (patch) | |
tree | 30f2e9e89ab71a2df837076ac68c3ba770230294 /tests/ts/cal | |
download | util-linux-upstream/2.22.tar.gz |
Imported Upstream version 2.22upstream/2.22upstream
Diffstat (limited to 'tests/ts/cal')
-rwxr-xr-x | tests/ts/cal/1m | 59 | ||||
-rwxr-xr-x | tests/ts/cal/3m | 58 | ||||
-rwxr-xr-x | tests/ts/cal/year | 58 |
3 files changed, 175 insertions, 0 deletions
diff --git a/tests/ts/cal/1m b/tests/ts/cal/1m new file mode 100755 index 0000000..b4e4b75 --- /dev/null +++ b/tests/ts/cal/1m @@ -0,0 +1,59 @@ +#!/bin/bash + +# +# Copyright (C) 2007 Karel Zak <kzak@redhat.com> +# +# 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="$(dirname $0)/../.." +TS_DESC="1 month" + +. $TS_TOPDIR/functions.sh +ts_init "$*" + +set -o pipefail + +USETERM=$( ts_has_option "useterm" "$*" ) +MYTIME="27 09 2006" + +[ "$USETERM" == "yes" ] && TS_VERBOSE="yes" +ts_log "" + +ts_log "Gregorian - Monday-based week" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -1m $MYTIME +fi +$TS_CMD_CAL -1m $MYTIME >> $TS_OUTPUT + +ts_log "Gregorian - Sunday-based week" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -1s $MYTIME +fi +$TS_CMD_CAL -1s $MYTIME >> $TS_OUTPUT + + +ts_log "Julian - Monday-based week" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -1mj $MYTIME +fi +$TS_CMD_CAL -1mj $MYTIME >> $TS_OUTPUT + +ts_log "Julian - Sunday-based week" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -1sj $MYTIME +fi +$TS_CMD_CAL -1sj $MYTIME >> $TS_OUTPUT + +ts_finalize + diff --git a/tests/ts/cal/3m b/tests/ts/cal/3m new file mode 100755 index 0000000..bf9c222 --- /dev/null +++ b/tests/ts/cal/3m @@ -0,0 +1,58 @@ +#!/bin/bash + +# +# Copyright (C) 2007 Karel Zak <kzak@redhat.com> +# +# 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="$(dirname $0)/../.." +TS_DESC="3 months" + +. $TS_TOPDIR/functions.sh +ts_init "$*" + +set -o pipefail + +USETERM=$( ts_has_option "useterm" "$*" ) +MYTIME="27 09 2006" + +[ "$USETERM" == "yes" ] && TS_VERBOSE="yes" +ts_log "" + +ts_log "Gregorian - Monday-based week" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -3m $MYTIME +fi +$TS_CMD_CAL -3m $MYTIME >> $TS_OUTPUT + +ts_log "Gregorian - Sunday-based week" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -3s $MYTIME +fi +$TS_CMD_CAL -3s $MYTIME >> $TS_OUTPUT + + +ts_log "Julian - Monday-based week" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -3mj $MYTIME +fi +$TS_CMD_CAL -3mj $MYTIME >> $TS_OUTPUT + +ts_log "Julian - Sunday-based week" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -3sj $MYTIME +fi +$TS_CMD_CAL -3sj $MYTIME >> $TS_OUTPUT + +ts_finalize + diff --git a/tests/ts/cal/year b/tests/ts/cal/year new file mode 100755 index 0000000..e1d4d95 --- /dev/null +++ b/tests/ts/cal/year @@ -0,0 +1,58 @@ +#!/bin/bash + +# +# Copyright (C) 2007 Karel Zak <kzak@redhat.com> +# +# 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="$(dirname $0)/../.." +TS_DESC="year" + +. $TS_TOPDIR/functions.sh +ts_init "$*" + +set -o pipefail + +USETERM=$( ts_has_option "useterm" "$*" ) +MYTIME="29 11 2006" + +[ "$USETERM" == "yes" ] && TS_VERBOSE="yes" +ts_log "" + +ts_log "Gregorian - Monday-based week" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -ym $MYTIME +fi +$TS_CMD_CAL -ym $MYTIME >> $TS_OUTPUT + +ts_log "Gregorian - Sunday-based week" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -ys $MYTIME +fi +$TS_CMD_CAL -ys $MYTIME >> $TS_OUTPUT + + +ts_log "Julian - Monday-based week" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -ymj $MYTIME +fi +$TS_CMD_CAL -ymj $MYTIME >> $TS_OUTPUT + +ts_log "Julian - Sunday-based week" +if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL -ysj $MYTIME +fi +$TS_CMD_CAL -ysj $MYTIME >> $TS_OUTPUT + +ts_finalize + |