summaryrefslogtreecommitdiff
path: root/test/day-002.sh
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-12-22 00:49:29 +0100
committerLukas Fleischer <calcurse@cryptocrack.de>2012-12-22 01:09:17 +0100
commit2ea91e1a8a2ee4318e3530ec2680565ad11b1585 (patch)
tree3ce57c3d13289ba7bc84efa1f79973beded78aa5 /test/day-002.sh
parentc054182890b5a2145d457d8ecade200d851e95fd (diff)
downloadcalcurse-2ea91e1a8a2ee4318e3530ec2680565ad11b1585.zip
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 <calcurse@cryptocrack.de>
Diffstat (limited to 'test/day-002.sh')
-rwxr-xr-xtest/day-002.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/day-002.sh b/test/day-002.sh
index 3f984c6..a9ac2c4 100755
--- a/test/day-002.sh
+++ b/test/day-002.sh
@@ -6,7 +6,8 @@ if [ ! -x "$(command -v faketime)" ]; then
fi
if [ "$1" = 'actual' ]; then
- faketime '1912-06-23' "$CALCURSE" --read-only -D "$DATA_DIR"/ -d42
+ faketime -f '1912-06-23 00:00:00' "$CALCURSE" --read-only -D "$DATA_DIR"/ \
+ -d42
elif [ "$1" = 'expected' ]; then
cat <<EOD
06/24/12: