summaryrefslogtreecommitdiffstats
path: root/regress
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2021-08-22 16:33:40 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2021-08-22 16:33:57 +0100
commitbc71e233d95378f927c8d68a686c0fb362a67ddb (patch)
tree5ffce863084d8a3d50bf2f65fe1128ed509ca775 /regress
parent03054598df77da74499babd4d4cd2f3575c81d22 (diff)
Fix style regress test.
Diffstat (limited to 'regress')
-rw-r--r--regress/style-trim.sh20
1 files changed, 9 insertions, 11 deletions
diff --git a/regress/style-trim.sh b/regress/style-trim.sh
index 56f93656..720d99fd 100644
--- a/regress/style-trim.sh
+++ b/regress/style-trim.sh
@@ -19,11 +19,9 @@ check() {
sleep 1
r=$($TMUX2 capturep -Cep|tail -1|sed 's|\\033\[||g')
- #printf "$1 = [$v = $2] [$r = $3]"
- if [ "$v" = "$2" -a "$r" = "$3" ]; then
- : #printf " good\n"
- else
- #printf " \033[31mbad\033[0m\n"
+ if [ "$v" != "$2" -o "$r" != "$3" ]; then
+ printf "$1 = [$v = $2] [$r = $3]"
+ printf " \033[31mbad\033[0m\n"
exit 1
fi
}
@@ -46,16 +44,16 @@ check '#{V} #{w:V}' '#0123456 8' '#0123456 8'
check '#{=3:V}' '#01' '#01'
check '#{=-3:V}' '456' '456'
-# drawn as ##0123456
+# drawn as #0123456
$TMUX setenv -g V '##0123456'
-check '#{V} #{w:V}' '##0123456 9' '##0123456 9'
-check '#{=3:V}' '##0' '##0'
+check '#{V} #{w:V}' '##0123456 8' '#0123456 8'
+check '#{=3:V}' '##01' '#01'
check '#{=-3:V}' '456' '456'
-# drawn as ###0123456
+# drawn as ##0123456
$TMUX setenv -g V '###0123456'
-check '#{V} #{w:V}' '###0123456 10' '###0123456 10'
-check '#{=3:V}' '###' '###'
+check '#{V} #{w:V}' '###0123456 9' '##0123456 9'
+check '#{=3:V}' '####0' '##0'
check '#{=-3:V}' '456' '456'
# drawn as 0123456