diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-05-04 14:45:09 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-05-04 14:45:45 -0400 |
commit | 01e70bb7e201ab5ab6c5872d618491e07330f8ef (patch) | |
tree | 0c57e907f48ed19b37a2164683f68d5ee3baa9a1 | |
parent | 561897d54b236e27b785e7b7b637d9d610519f1e (diff) |
test: toru-path: add a check for the T= option to set TORUPATH
-rw-r--r-- | test/toru-path-test.sh | 12 |
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" +} |