From df7e23e93574873618aee45820803ee4c38d9698 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 05:34:38 +0200 Subject: Adding debian version 3.3a-5. Signed-off-by: Daniel Baumann --- debian/tests/control | 2 ++ debian/tests/smoketest | 17 +++++++++++++++++ debian/tests/utmp | 29 +++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 debian/tests/control create mode 100755 debian/tests/smoketest create mode 100755 debian/tests/utmp (limited to 'debian/tests') diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..fd4b2fe --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,2 @@ +Tests: smoketest, utmp +Depends: @ diff --git a/debian/tests/smoketest b/debian/tests/smoketest new file mode 100755 index 0000000..414ac35 --- /dev/null +++ b/debian/tests/smoketest @@ -0,0 +1,17 @@ +#!/bin/sh + +set -e + +SESSION="test_session" + +if tmux list-sessions 2>/dev/null; then + echo >&2 "Found unexpected tmux session" + exit 1 +fi +tmux new-session -d -s $SESSION +tmux list-sessions | grep -q $SESSION >/dev/null +tmux kill-session -t $SESSION +if tmux list-sessions 2>/dev/null; then + echo >&2 "Found unexpected tmux session" + exit 1 +fi 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 -- cgit v1.2.3