Make tests work with OpenBSD's unversioned tmux

This tests for OpenBSD 6.x or later.  We could likely extend the
test to much older OpenBSD versions, but not without OS installs
and testing.
This commit is contained in:
John Hood
2017-03-20 11:42:04 -04:00
parent 654f269917
commit 3b1984f9f8
+8
View File
@@ -60,6 +60,14 @@ test_exitstatus()
# Tmux check.
tmux_check()
{
# OpenBSD tmux does not have '-V'.
if [ "$(uname -s)" = "OpenBSD" ]; then
openbsd_major="$(uname -r)"
openbsd_major="${openbsd_major%%.*}"
if [ "${openbsd_major}" -ge 6 ]; then
return 0
fi
fi
version=$(tmux -V)
if [ $? != 0 ]; then
error "tmux unavailable\n"