From 01e70bb7e201ab5ab6c5872d618491e07330f8ef Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 4 May 2017 14:45:09 -0400 Subject: test: toru-path: add a check for the T= option to set TORUPATH --- test/toru-path-test.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') 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" +} -- cgit v1.2.3-54-g00ecf