From 4a2f5e2183c42562bf5f766c6ed01da3880dc10c Mon Sep 17 00:00:00 2001 From: Nitroretro Date: Sat, 21 Dec 2019 04:16:40 +0200 Subject: Test for the directory structure Ensure that calcurse uses the right data and configuration directories depending on the conditions. Helped-by: Lars Henriksen Signed-off-by: Lukas Fleischer --- test/io-006.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 test/io-006.sh (limited to 'test/io-006.sh') diff --git a/test/io-006.sh b/test/io-006.sh new file mode 100755 index 0000000..4184d9f --- /dev/null +++ b/test/io-006.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +. "${TEST_INIT:-./test-init.sh}" +dir=$(mktemp -d) + +CALCURSE=$(readlink -f "$CALCURSE") +cd "$dir" +(unset -v HOME XDG_DATA_HOME XDG_CONFIG_HOME; "$CALCURSE" -a) +[ -f "$dir/.calcurse/apts" ] && [ -f "$dir/.calcurse/conf" ] && failed=0 || failed=1 + +rm -rf "$dir" +exit "$failed" -- cgit v1.2.3-54-g00ecf