From 6e57401610c98232ec5cfc791107c40a0dcc5720 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 14 Jun 2017 08:37:58 +0100 Subject: [PATCH] New test. --- regress/has-session-return.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 regress/has-session-return.sh diff --git a/regress/has-session-return.sh b/regress/has-session-return.sh new file mode 100644 index 00000000..5cc30f05 --- /dev/null +++ b/regress/has-session-return.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +# 971 +# has-session should return 1 on error + +PATH=/bin:/usr/bin +TERM=screen + +[ -z "$TEST_TMUX" ] && TEST_TMUX=$(readlink -f ../tmux) +TMUX="$TEST_TMUX -Ltest" +$TMUX kill-server 2>/dev/null + +$TMUX -f/dev/null has -tfoo /dev/null && exit 1 +$TMUX -f/dev/null start\; has -tfoo /dev/null && exit 1 +$TMUX -f/dev/null new -d\; has -tfoo /dev/null && exit 1 +$TMUX -f/dev/null new -dsfoo\; has -tfoo /dev/null || exit 1 +$TMUX kill-server 2>/dev/null + +exit 0