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>
20 lines
372 B
Bash
Executable File
20 lines
372 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ ! -x "$(command -v faketime)" ]; then
|
|
echo "libfaketime not found - skipping $0..."
|
|
exit 0
|
|
fi
|
|
|
|
if [ "$1" = 'actual' ]; then
|
|
faketime -f '2011-02-25 23:42:00' "$CALCURSE" --read-only -D "$DATA_DIR" -a
|
|
elif [ "$1" = 'expected' ]; then
|
|
cat <<EOD
|
|
02/25/11:
|
|
* Socket ghastlier
|
|
- ..:.. -> ..:..
|
|
Covenants useful smoker's
|
|
EOD
|
|
else
|
|
./run-test "$0"
|
|
fi
|