summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKarel Zak2018-02-02 10:16:27 +0100
committerKarel Zak2018-02-02 10:16:27 +0100
commit22db7b5132e6dd9653f85689b019faadd8a107e7 (patch)
tree37794260e22ef4d1b178375dd728bd9a44cd185f /tests
parentcal: add ifdef TEST_CAL (diff)
downloadkernel-qcow2-util-linux-22db7b5132e6dd9653f85689b019faadd8a107e7.tar.gz
kernel-qcow2-util-linux-22db7b5132e6dd9653f85689b019faadd8a107e7.tar.xz
kernel-qcow2-util-linux-22db7b5132e6dd9653f85689b019faadd8a107e7.zip
tests: use TS_HELPER_CAL
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/commands.sh1
-rwxr-xr-xtests/ts/cal/month7
-rwxr-xr-xtests/ts/cal/sep17527
3 files changed, 11 insertions, 4 deletions
diff --git a/tests/commands.sh b/tests/commands.sh
index 985064446..1be2d25b4 100644
--- a/tests/commands.sh
+++ b/tests/commands.sh
@@ -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"}
diff --git a/tests/ts/cal/month b/tests/ts/cal/month
index ba4e07af0..9794e90c0 100755
--- a/tests/ts/cal/month
+++ b/tests/ts/cal/month
@@ -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
}
diff --git a/tests/ts/cal/sep1752 b/tests/ts/cal/sep1752
index 986f01a60..3128261cd 100755
--- a/tests/ts/cal/sep1752
+++ b/tests/ts/cal/sep1752
@@ -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 {