tests: improve test purity
Before the XDG variables would be set from the user's environment, if available. This would break some tests. With this change the tests should be fully deterministic. Fixes #1190
This commit is contained in:
parent
cfaf213980
commit
95b95b1407
17 changed files with 21 additions and 54 deletions
|
|
@ -1,5 +0,0 @@
|
|||
# Only source this once.
|
||||
if [ -n "$__HM_SESS_VARS_SOURCED" ]; then return; fi
|
||||
export __HM_SESS_VARS_SOURCED=1
|
||||
|
||||
export TMUX_TMPDIR="${XDG_RUNTIME_DIR:-"/run/user/\$(id -u)"}"
|
||||
|
|
@ -11,9 +11,8 @@ with lib;
|
|||
|
||||
nmt.script = ''
|
||||
assertFileExists home-path/etc/profile.d/hm-session-vars.sh
|
||||
assertFileContent home-path/etc/profile.d/hm-session-vars.sh ${
|
||||
./hm-session-vars.sh
|
||||
}
|
||||
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
|
||||
'export TMUX_TMPDIR="''${XDG_RUNTIME_DIR:-"/run/user/\$(id -u)"}"'
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue