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>
This commit is contained in:
Nitroretro
2019-12-21 04:16:40 +02:00
committed by Lukas Fleischer
parent 992cf45dc9
commit 4a2f5e2183
7 changed files with 74 additions and 0 deletions

11
test/io-005.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
. "${TEST_INIT:-./test-init.sh}"
home=$(mktemp -d)
CALCURSE=$(readlink -f "$CALCURSE")
(unset -v XDG_DATA_HOME XDG_CONFIG_HOME; HOME="$home" "$CALCURSE" -a)
[ -f "$home/.local/share/calcurse/apts" ] && [ -f "$home/.config/calcurse/conf" ] && failed=0 || failed=1
rm -rf "$home"
exit "$failed"