Disable emulation-attributes-bce on tmux 3.3a
tmux 3.3a has a behavior change, since reverted, that is incompatible with this test. Unfortunately, tmux 3.3a has already made it into some distributions, so the test has to be disabled when tmux 3.3a is encountered.
This commit is contained in:
committed by
Benjamin Barenblat
parent
f3665fb99b
commit
68226283cb
@@ -81,6 +81,19 @@ set_locale()
|
||||
return 1
|
||||
}
|
||||
|
||||
# Given two versions, return success if the first version is less than
|
||||
# or equal to the second version.
|
||||
versionlte()
|
||||
{
|
||||
[ "$1" = "$(printf "$1\n$2\n" | sort -V | head -n1)" ]
|
||||
}
|
||||
versionlt() {
|
||||
if [ "$1" = "$2" ]; then
|
||||
return 1
|
||||
fi
|
||||
versionlte "$1" "$2"
|
||||
}
|
||||
|
||||
# Tmux check.
|
||||
tmux_check()
|
||||
{
|
||||
@@ -103,11 +116,8 @@ tmux_check()
|
||||
return 0
|
||||
fi
|
||||
version=${version##tmux }
|
||||
version_major=${version%%.*}
|
||||
version_minor=${version##*.}
|
||||
|
||||
if [ "$version_major" -lt "$need_major" ] ||
|
||||
{ [ "$version_major" -eq "$need_major" ] && [ "$version_minor" -lt "$need_minor" ]; }; then
|
||||
if versionlt "$version" "$need_major.$need_minor"; then
|
||||
printf "tmux version %s too old\n" "$version" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
@@ -27,6 +27,14 @@ if [ "$(basename "$0")" = emulation-attributes-bce.test ] &&
|
||||
exit 77
|
||||
fi
|
||||
|
||||
# tmux 3.3a has a behavior change in how BCE is handled, which has
|
||||
# been reverted: https://github.com/tmux/tmux/issues/3339
|
||||
if [ "$(basename "$0")" = emulation-attributes-bce.test ] &&
|
||||
tmux_check 3 3a && ! tmux_check 3 3b; then
|
||||
printf "tmux 3.3a has incompatible BCE behavior\n" >&2
|
||||
exit 77
|
||||
fi
|
||||
|
||||
# Top-level wrapper.
|
||||
if [ $# -eq 0 ]; then
|
||||
e2e-test "$0" baseline direct verify
|
||||
|
||||
Reference in New Issue
Block a user