summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/toru-path-test.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/toru-path-test.sh b/test/toru-path-test.sh
index 645dd8c..86571be 100644
--- a/test/toru-path-test.sh
+++ b/test/toru-path-test.sh
@@ -36,3 +36,15 @@ it_runs() {
diff "$tmpdir/paths-expected.txt" "$tmpdir/paths-actual.txt"
}
+
+it_sets_torupath() {
+ mkdir -p "$XDG_CONFIG_HOME"/libretools
+ printf 'TORUPATH=%q\n' "$tmpdir" >> "$XDG_CONFIG_HOME"/libretools/libretools.conf
+ echo 'REPOS=(libre)' >> "$XDG_CONFIG_HOME"/libretools/libretools.conf
+ printf 'ABSROOT=%q\n' "$PWD/toru.d" >> "$HOME"/.abs.conf
+
+ mkdir -p "$tmpdir/x"
+ T="$tmpdir/x" toru-path
+ test -f "$tmpdir/x/paths.tch"
+ not test -e "$tmpdir/paths.tch"
+}