zsh-workers
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: [PATCH] Tests/X04: use temporary pattern matching for OpenBSD missing leading 0m
Date: Tue, 22 Jan 2019 16:27:16 +0100	[thread overview]
Message-ID: <CAKc7PVAcNJxUgDOshnJ0d8e5FNqF5c-scCST_ba0Fmr2uuv4_w@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 584 bytes --]

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

[-- Attachment #2: X04zlehighlight_OpenBSD_fauils.patch.txt --]
[-- Type: text/plain, Size: 2951 bytes --]

From 349fe27b670bc2168e9829f33d61162f32318585 Mon Sep 17 00:00:00 2001
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
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)


             reply	other threads:[~2019-01-22 15:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-22 15:27 Sebastian Gniazdowski [this message]
2019-01-23  4:27 ` dana

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKc7PVAcNJxUgDOshnJ0d8e5FNqF5c-scCST_ba0Fmr2uuv4_w@mail.gmail.com \
    --to=sgniazdowski@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).