diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 17:41:01 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 17:41:01 +0000 |
commit | a1c8c315b487542ec54c92c091f3f4ab5644fb54 (patch) | |
tree | b68af5b092e9f2ca59caea1252a6babf78283bf6 /debian/tests/utmp | |
parent | Adding upstream version 3.3a. (diff) | |
download | tmux-debian.tar.xz tmux-debian.zip |
Adding debian version 3.3a-3.debian/3.3a-3debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests/utmp')
-rwxr-xr-x | debian/tests/utmp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/debian/tests/utmp b/debian/tests/utmp new file mode 100755 index 0000000..e785679 --- /dev/null +++ b/debian/tests/utmp @@ -0,0 +1,29 @@ +#!/bin/sh + +# Check for regressions on https://github.com/tmux/tmux/issues/2022, +# where a utmp entry would not be created for new tmux sessions + +set -e + +SESSION="test_session" + +if who | grep -q tmux; then + echo >&2 "tmux should not have registered utmp entries yet" + exit 1 +fi + +tmux new-session -d -s $SESSION + +# make sure a utmp entry was created +if ! who | grep -q tmux; then + # clean up + tmux kill-session -t $SESSION + echo >&2 "no utmp entries found for tmux" + exit 1 +fi + +tmux kill-session -t $SESSION +if who | grep -q tmux; then + echo >&2 "tmux should have unregistered utmp entries" + exit 1 +fi |