summaryrefslogtreecommitdiffstats
path: root/tests/ts
diff options
context:
space:
mode:
authorKarel Zak2018-08-07 11:06:13 +0200
committerKarel Zak2018-08-07 11:06:13 +0200
commitf2538b6a86579008870494906bcd75acd2d44a65 (patch)
tree658d1db7f24f5d6c6ed3bdde9cf513115960f590 /tests/ts
parenttests: check for test_cal (diff)
downloadkernel-qcow2-util-linux-f2538b6a86579008870494906bcd75acd2d44a65.tar.gz
kernel-qcow2-util-linux-f2538b6a86579008870494906bcd75acd2d44a65.tar.xz
kernel-qcow2-util-linux-f2538b6a86579008870494906bcd75acd2d44a65.zip
tests: add cal --span tests
Addresses: https://github.com/karelzak/util-linux/issues/677 Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/ts')
-rwxr-xr-xtests/ts/cal/month7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/ts/cal/month b/tests/ts/cal/month
index 37996acae..62fd1f928 100755
--- a/tests/ts/cal/month
+++ b/tests/ts/cal/month
@@ -33,7 +33,7 @@ CAL_TEST_TIME=1516562739 # 21st January 2018
export CAL_TEST_TIME
function call_cal {
- local testname=$(echo "$2" | sed 's/-//g')
+ local testname=$(echo "$2" | sed 's/-//g; s/ //g')
ts_init_subtest "$testname"
ts_log "$1"
@@ -63,5 +63,10 @@ call_cal "Gregorian - Sunday-based week with week numbers" -3sw $MYTIME
call_cal "Julian - Monday-based week with week numbers" -3mjw $MYTIME
call_cal "Julian - Sunday-based week with week numbers" -3sjw $MYTIME
+call_cal "Normal span" "-Sn 3" $MYTIME
+call_cal "Large span" "-Sn 21" $MYTIME
+call_cal "Very Large span" "-Sn 51" $MYTIME
+call_cal "Extreme span" "-Sn 201" $MYTIME
+
ts_finalize