diff options
author | Karel Zak | 2018-01-22 15:46:01 +0100 |
---|---|---|
committer | Karel Zak | 2018-01-22 16:00:39 +0100 |
commit | a88564a061766026b7b80c85176ae7a30eb0d9be (patch) | |
tree | acdafe4e6e44ba6081dd36671d2122c197d62b0b /tests/ts/cal/sep1752w | |
parent | tests: use subtests for sep1752w test (diff) | |
download | kernel-qcow2-util-linux-a88564a061766026b7b80c85176ae7a30eb0d9be.tar.gz kernel-qcow2-util-linux-a88564a061766026b7b80c85176ae7a30eb0d9be.tar.xz kernel-qcow2-util-linux-a88564a061766026b7b80c85176ae7a30eb0d9be.zip |
tests: merge sep1752 cal(1) tests
* merge tests
* use subtests for cal(1) calls
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/ts/cal/sep1752w')
-rwxr-xr-x | tests/ts/cal/sep1752w | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/tests/ts/cal/sep1752w b/tests/ts/cal/sep1752w deleted file mode 100755 index a3e15550d..000000000 --- a/tests/ts/cal/sep1752w +++ /dev/null @@ -1,81 +0,0 @@ -#!/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="September 1752 with week numbers" - -. $TS_TOPDIR/functions.sh -ts_init "$*" - -ts_check_test_command "$TS_CMD_CAL" - -export TERM=linux - -USETERM=$( ts_has_option "useterm" "$*" ) -MYMONTH="09 1752" -MYYEAR="1752" - -function call_cal_simple { - ts_log "$1" - shift - if [ "$USETERM" == "yes" ]; then - $TS_CMD_CAL "$@" - fi - $TS_CMD_CAL "$@" >> $TS_OUTPUT -} - -function call_cal { - local testname=$(echo "$2" | sed 's/-//g') - - if [ "$3" == "$MYYEAR" ]; then - testname="${testname}-year" - else - testname="${testname}-month" - fi - - ts_init_subtest "$testname" - call_cal_simple "$@" - ts_finalize_subtest -} - - -call_cal "Gregorian - Monday-based month with week numbers" -1mw $MYMONTH - -call_cal "Gregorian - Sunday-based month with week numbers" -1sw $MYMONTH - -call_cal "Julian - Monday-based month with week numbers" -1mjw $MYMONTH - -call_cal "Julian - Sunday-based month with week numbers" -1sjw $MYMONTH - -call_cal "Gregorian - Monday-based three months with week numbers" -3mw $MYMONTH - -call_cal "Gregorian - Sunday-based three months with week numbers" -3sw $MYMONTH - -call_cal "Julian - Monday-based three months with week numbers" -3mjw $MYMONTH - -call_cal "Julian - Sunday-based three months with week numbers" -3sjw $MYMONTH - -call_cal "Gregorian - Monday-based year with week numbers" -1mw $MYYEAR - -call_cal "Gregorian - Sunday-based year with week numbers" -1sw $MYYEAR - -call_cal "Julian - Monday-based year with week numbers" -1mjw $MYYEAR - -call_cal "Julian - Sunday-based year with week numbers" -1sjw $MYYEAR - -ts_init_subtest "week-iso" -call_cal_simple "Gregorian - address by week number" --week=40 --iso $MYYEAR -ts_finalize_subtest - -ts_finalize |