From 3b1984f9f8c896d7edc49d34471b1b1c7aa3477f Mon Sep 17 00:00:00 2001 From: John Hood Date: Mon, 20 Mar 2017 11:42:04 -0400 Subject: [PATCH] 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. --- src/tests/e2e-test | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/tests/e2e-test b/src/tests/e2e-test index 7a8e6b7..1c69be8 100755 --- a/src/tests/e2e-test +++ b/src/tests/e2e-test @@ -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"