calcurse-edge/test/io-004.sh
Nitroretro 4a2f5e2183 Test for the directory structure
Ensure that calcurse uses the right data and configuration directories
depending on the conditions.

Helped-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2019-12-23 13:16:39 -05:00

13 lines
305 B
Bash
Executable File

#!/bin/sh
. "${TEST_INIT:-./test-init.sh}"
home=$(mktemp -d)
data=$(mktemp -d)
conf=$(mktemp -d)
HOME="$home" XDG_DATA_HOME="$data" XDG_CONFIG_HOME="$conf" "$CALCURSE" -a
[ -f "$data/calcurse/apts" ] && [ -f "$conf/calcurse/conf" ] && failed=0 || failed=1
rm -rf "$home" "$data" "$conf"
exit "$failed"