Debian Codegraph @

tests/ts/cal/jan1753

raw
1 #!/bin/bash
2
3 # This file is part of util-linux.
4 #
5 # This file is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # This file is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14
15 TS_TOPDIR="${0%/*}/../.."
16 TS_DESC="January 1753"
17
18 . "$TS_TOPDIR"/functions.sh
19 ts_init "$*"
20
21 ts_check_test_command "$TS_CMD_CAL"
22
23 export TERM=linux
24
25 USETERM=$( ts_has_option "useterm" "$*" )
26 MYMONTH="1 1753"
27
28 function call_cal {
29 local testname=$(echo "$2" | sed 's/-//g')
30
31 ts_init_subtest "$testname"
32 ts_log "$1"
33 shift
34 if [ "$USETERM" == "yes" ]; then
35 $TS_CMD_CAL "$@"
36 fi
37 $TS_CMD_CAL "$@" >> $TS_OUTPUT
38
39 ts_finalize_subtest
40 }
41
42 call_cal "Monday-based 1753 week numbers" --monday --three --week $MYMONTH
43 call_cal "Sunday-based 1753 week numbers" -3w $MYMONTH
44
45 ts_finalize