Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] Tests/X04: use temporary pattern matching for OpenBSD missing leading 0m



phy1729 reports that OpenBSD doesn't include a leading 0m in its
control codes output. Thus, X04 tests fail on that OS. The temporary
solution is: use pattern matching with leading (0m|), e.g.:

->0m27m24mtr7mu27me word2 word3
+*>(0m|)27m24mtr7mu27me word2 word3

Attached patch does this. In longer term one will have to debug zsh on OpenBSD.

The phy1729's message:
https://gist.github.com/phy1729/6206469618627afd031c167c26a3bf3c
-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org
From 349fe27b670bc2168e9829f33d61162f32318585 Mon Sep 17 00:00:00 2001
From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
Date: Tue, 22 Jan 2019 16:18:08 +0100
Subject: [PATCH] Tests/X04: use temporary pattern matching for OpenBSD missing
 leading 0m

---
 Test/X04zlehighlight.ztst | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/Test/X04zlehighlight.ztst b/Test/X04zlehighlight.ztst
index e14517490..110de1251 100644
--- a/Test/X04zlehighlight.ztst
+++ b/Test/X04zlehighlight.ztst
@@ -74,7 +74,7 @@
   zpty_line 1 p       # the line of interest, preserving escapes ("p")
   zpty_stop
 0:region highlight - standout overlapping on other region_highlight entry
->0m27m24mtr7mu27me word2 word3
+*>(0m|)27m24mtr7mu27me word2 word3
 
   zpty_start
   zpty_input 'rh_widget() { BUFFER="true"; region_highlight+=( "0 4 fg=green" ); }'
@@ -85,7 +85,7 @@
   zpty_line 1 p       # the line of interest, preserving escapes ("p")
   zpty_stop
 0:basic region_highlight with 8 colors
->0m27m24mCDE|32|trueCDE|39|
+*>(0m|)27m24mCDE\|32\|trueCDE\|39\|
 
   zpty_start
   zpty_input 'rh_widget() { BUFFER="true"; region_highlight+=( "0 4 fg=#040810" ); }'
@@ -96,7 +96,7 @@
   zpty_line 1 p       # the line of interest, preserving escapes ("p")
   zpty_stop
 0:basic region_highlight with true-color (hex-triplets)
->0m27m24mCDE|38;2;4;8;16|trueCDE|39|
+*>(0m|)27m24mCDE\|38;2;4;8;16\|trueCDE\|39\|
 
   zpty_start
   zpty_input 'zmodload zsh/nearcolor'
@@ -108,7 +108,7 @@
   zpty_line 1 p       # the line of interest, preserving escapes ("p")
   zpty_stop
 0:basic region_highlight with near-color (hex-triplets at input)
->0m27m24mCDE|38;5;232|trueCDE|39|
+*>(0m|)27m24mCDE\|38;5;232\|trueCDE\|39\|
 
   zpty_start
   zpty_input 'rh_widget() { BUFFER="true"; region_highlight+=( "0 4 fg=green" ); rh2; }'
@@ -120,7 +120,7 @@
   zpty_line 1 p       # the line of interest, preserving escapes ("p")
   zpty_stop
 0:overlapping region_highlight with 8 colors
->0m27m24mCDE|32|tCDE|31|rCDE|39|CDE|32|ueCDE|39|
+*>(0m|)27m24mCDE\|32\|tCDE\|31\|rCDE\|39\|CDE\|32\|ueCDE\|39\|
 
   zpty_start
   zpty_input 'rh_widget() { BUFFER="true"; region_highlight+=( "0 4 fg=#00cc00" ); rh2; }'
@@ -132,7 +132,7 @@
   zpty_line 1 p       # the line of interest, preserving escapes ("p")
   zpty_stop
 0:overlapping region_highlight with true-color
->0m27m24mCDE|38;2;0;204;0|tCDE|38;2;204;0;0|rCDE|39|CDE|38;2;0;204;0|ueCDE|39|
+*>(0m|)27m24mCDE\|38;2;0;204;0\|tCDE\|38;2;204;0;0\|rCDE\|39\|CDE\|38;2;0;204;0\|ueCDE\|39\|
 
   zpty_start
   zpty_input 'zmodload zsh/nearcolor'
@@ -145,7 +145,7 @@
   zpty_line 1 p       # the line of interest, preserving escapes ("p")
   zpty_stop
 0:overlapping region_highlight with near-color (hex-triplets at input)
->0m27m24mCDE|38;5;40|tCDE|38;5;160|rCDE|39|CDE|38;5;40|ueCDE|39|
+*>(0m|)27m24mCDE\|38;5;40\|tCDE\|38;5;160\|rCDE\|39\|CDE\|38;5;40\|ueCDE\|39\|
 
 %clean
 
-- 
2.15.1 (Apple Git-101)



Messages sorted by: Reverse Date, Date, Thread, Author