From 2ea91e1a8a2ee4318e3530ec2680565ad11b1585 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sat, 22 Dec 2012 00:49:29 +0100 Subject: test/: Use `faketime -f` Use the advanced timestamp specification format for libfaketime. Before using that, some tests failed on 32-bit systems due to integer overflows. It seems like faketime translates absolute dates to relative dates by default. Moreover, libfaketime is not able to handle relative dates that exceed the maximum value of a signed integer. Using "-f" skips the conversion to relative dates. Signed-off-by: Lukas Fleischer --- test/appointment-001.sh | 2 +- test/day-002.sh | 3 ++- test/day-003.sh | 3 ++- test/next-001.sh | 2 +- test/range-001.sh | 2 +- test/range-002.sh | 3 ++- test/range-003.sh | 3 ++- 7 files changed, 11 insertions(+), 7 deletions(-) diff --git a/test/appointment-001.sh b/test/appointment-001.sh index ad811a3..c0f60c7 100755 --- a/test/appointment-001.sh +++ b/test/appointment-001.sh @@ -6,7 +6,7 @@ if [ ! -x "$(command -v faketime)" ]; then fi if [ "$1" = 'actual' ]; then - faketime '2011-02-25 23:42' "$CALCURSE" --read-only -D "$DATA_DIR" -a + faketime -f '2011-02-25 23:42:00' "$CALCURSE" --read-only -D "$DATA_DIR" -a elif [ "$1" = 'expected' ]; then cat <