From 92d50414c43f211f5cf008055199d18ed3dc1fef Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 4 Jul 2021 18:10:17 -0700 Subject: [PATCH] Fix the tmux-prompt test The tmux-prompt test was failing when run more than once, because XDG_DATA_HOME has a leading double-dot, causing the uvars file to leak across sessions. Descend more deeply into our tmpdir to isolate our XDG_DATA_HOME. --- tests/checks/tmux-prompt.fish | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/checks/tmux-prompt.fish b/tests/checks/tmux-prompt.fish index 1663da134..17a5070fb 100644 --- a/tests/checks/tmux-prompt.fish +++ b/tests/checks/tmux-prompt.fish @@ -2,7 +2,12 @@ #REQUIRES: command -v tmux # Isolated tmux. -set -g tmpdir (mktemp -d) +# Note $XDG_CONFIG_HOME typically has a leading double-dot, +# so our uvars file will leak across runs; therefore +# descend more deeply into the tmpdir. +set -g tmpdir (mktemp -d)/inner1/inner2/ +mkdir -p $tmpdir + set -g tmux tmux -S $tmpdir/.tmux-socket -f /dev/null set -g sleep sleep .1