aboutsummaryrefslogtreecommitdiffstats
path: root/test/io-001.sh
diff options
context:
space:
mode:
authorNitroretro <nitroretro@protonmail.com>2019-12-21 04:16:40 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2019-12-23 13:16:39 -0500
commit4a2f5e2183c42562bf5f766c6ed01da3880dc10c (patch)
treea3026d82fd56c913961ccabb7bb62dfa9d2e35c2 /test/io-001.sh
parent992cf45dc92b6aba36b47b496dbb0dc443aa200f (diff)
downloadcalcurse-4a2f5e2183c42562bf5f766c6ed01da3880dc10c.tar.gz
calcurse-4a2f5e2183c42562bf5f766c6ed01da3880dc10c.zip
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>
Diffstat (limited to 'test/io-001.sh')
-rwxr-xr-xtest/io-001.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/io-001.sh b/test/io-001.sh
new file mode 100755
index 0000000..77757f6
--- /dev/null
+++ b/test/io-001.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+. "${TEST_INIT:-./test-init.sh}"
+data=$(mktemp -d)
+
+"$CALCURSE" -a -D "$data"
+[ -f "$data/apts" ] && [ -f "$data/conf" ] && failed=0 || failed=1
+
+rm -rf "$data"
+exit "$failed"