diff options
author | Karel Zak | 2009-01-19 16:50:51 +0100 |
---|---|---|
committer | Karel Zak | 2009-02-11 23:21:52 +0100 |
commit | 8387a824b576c41a0a4077cb1973046e91f7d1f6 (patch) | |
tree | 9cd1bd84ff46b051d1da990321e7624aaabe94ba /tests/ts/cal | |
parent | blkid: refresh TODO file (diff) | |
download | kernel-qcow2-util-linux-8387a824b576c41a0a4077cb1973046e91f7d1f6.tar.gz kernel-qcow2-util-linux-8387a824b576c41a0a4077cb1973046e91f7d1f6.tar.xz kernel-qcow2-util-linux-8387a824b576c41a0a4077cb1973046e91f7d1f6.zip |
tests: create subdirs for test scripts
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/ts/cal')
-rwxr-xr-x | tests/ts/cal/1m | 60 | ||||
-rwxr-xr-x | tests/ts/cal/3m | 60 | ||||
-rwxr-xr-x | tests/ts/cal/year | 60 |
3 files changed, 180 insertions, 0 deletions
diff --git a/tests/ts/cal/1m b/tests/ts/cal/1m new file mode 100755 index 000000000..53a1395ea --- /dev/null +++ b/tests/ts/cal/1m @@ -0,0 +1,60 @@ +#!/bin/bash + +# +# Copyright (C) 2007 Karel Zak <kzak@redhat.com> +# +# This file is part of util-linux-ng. +# +# 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. +# +. ./commands.sh +. ./functions.sh + +TS_COMPONENT="cal" +TS_DESC="1 month" + +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 000000000..aa815f586 --- /dev/null +++ b/tests/ts/cal/3m @@ -0,0 +1,60 @@ +#!/bin/bash + +# +# Copyright (C) 2007 Karel Zak <kzak@redhat.com> +# +# This file is part of util-linux-ng. +# +# 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. +# +. ./commands.sh +. ./functions.sh + +TS_COMPONENT="cal" +TS_DESC="3 months" + +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 000000000..769373a90 --- /dev/null +++ b/tests/ts/cal/year @@ -0,0 +1,60 @@ +#!/bin/bash + +# +# Copyright (C) 2007 Karel Zak <kzak@redhat.com> +# +# This file is part of util-linux-ng. +# +# 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. +# +. ./commands.sh +. ./functions.sh + +TS_COMPONENT="cal" +TS_DESC="year" + +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 + |