]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: use TS_HELPER_CAL
authorKarel Zak <kzak@redhat.com>
Fri, 2 Feb 2018 09:16:27 +0000 (10:16 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 2 Feb 2018 09:16:27 +0000 (10:16 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/commands.sh
tests/ts/cal/month
tests/ts/cal/sep1752

index 985064446d08bb44ae96f2f09d4418326ed22c7d..1be2d25b43fd47187009ba96e90753315934eb24 100644 (file)
@@ -39,6 +39,7 @@ TS_HELPER_TIOCSTI="$top_builddir/test_tiocsti"
 TS_HELPER_UUID_PARSER="$top_builddir/test_uuid_parser"
 TS_HELPER_UUID_NAMESPACE="$top_builddir/test_uuid_namespace"
 TS_HELPER_MBSENCODE="$top_builddir/test_mbsencode"
+TS_HELPER_CAL="$top_builddir/test_cal"
 
 # paths to commands
 TS_CMD_ADDPART=${TS_CMD_ADDPART:-"$top_builddir/addpart"}
index ba4e07af03f61db037d21c87ea607387d5967899..9794e90c0866f772c95da3da2c7c13308a2a86e8 100755 (executable)
@@ -29,6 +29,9 @@ export TERM=linux
 USETERM=$( ts_has_option "useterm" "$*" )
 MYTIME="27 09 2006"
 
+CAL_TEST_TIME=1516562739  # 21st January 2018
+export CAL_TEST_TIME
+
 function call_cal {
        local testname=$(echo "$2" | sed 's/-//g')
 
@@ -36,9 +39,9 @@ function call_cal {
        ts_log "$1"
        shift
        if [ "$USETERM" == "yes" ]; then
-               $TS_CMD_CAL "$@"
+               $TS_HELPER_CAL "$@"
        fi
-       $TS_CMD_CAL "$@" >> $TS_OUTPUT
+       $TS_HELPER_CAL "$@" >> $TS_OUTPUT
 
        ts_finalize_subtest
 }
index 986f01a60461b0c719ceae17153943f9b7f11c26..3128261cd93c9cf14bdca4d95baa1981aea8c4b8 100755 (executable)
@@ -26,13 +26,16 @@ USETERM=$( ts_has_option "useterm" "$*" )
 MYMONTH="09 1752"
 MYYEAR="1752"
 
+CAL_TEST_TIME=1516562739  # 21st January 2018
+export CAL_TEST_TIME
+
 function call_cal_simple {
        ts_log "$1"
        shift
        if [ "$USETERM" == "yes" ]; then
-               $TS_CMD_CAL "$@"
+               $TS_HELPER_CAL "$@"
        fi
-       $TS_CMD_CAL "$@" >> $TS_OUTPUT
+       $TS_HELPER_CAL "$@" >> $TS_OUTPUT
 }
 
 function call_cal {