summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2022-03-18 21:10:04 (EDT)
committer P. J. McDermott <pj@pehjota.net>2022-03-19 11:23:08 (EDT)
commita08a556f8f7da64696e3f735dcc008e2176741df (patch)
tree3d2af280d5f6a8294dedafa3ffb7b5acf29c6dd7 /tests
parenteb8dbc0d4cddd1161e2b02d7973985a36e2efc95 (diff)
downloadatsign-a08a556f8f7da64696e3f735dcc008e2176741df.zip
atsign-a08a556f8f7da64696e3f735dcc008e2176741df.tar.gz
atsign-a08a556f8f7da64696e3f735dcc008e2176741df.tar.bz2
main: Allow faking current time
Drop use of faketime in tests.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/parse.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/parse.sh b/tests/parse.sh
index 95a8a93..08a8dea 100755
--- a/tests/parse.sh
+++ b/tests/parse.sh
@@ -21,7 +21,7 @@ set -eu
. "${TOP_SRCDIR}/tests/aux/tap-functions.sh"
-fmts="$(TZ=UTC0 faketime -f '1970-01-01 00:00:00' "${TOP_BUILDDIR}/@" -F)"
+fmts="$(TZ=UTC0 "${TOP_BUILDDIR}/@" -d '1970-01-01 00:00:00' -F)"
time_fmts="$(printf '%s\n' "${fmts}" | \
sed -n '/^Time formats:$/,/^Date formats:$/s/^ \* //p')"
date_fmts="$(printf '%s\n' "${fmts}" | \
@@ -42,8 +42,8 @@ run_test()
datetime="${1}"
shift 1
- got="$(TZ=UTC0 faketime -f '1969-12-31 23:59:30' \
- "${TOP_BUILDDIR}/@" -d "${datetime}" 2>&1)" || :
+ got="$(TZ=UTC0 "${TOP_BUILDDIR}/@" -d '1969-12-31 23:59:30' \
+ "${datetime}" 2>&1)" || :
if [ x"${got}" = x'0' ]; then
ok_ -- "${datetime}"
else