From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 698ebba5 for ; Sat, 21 Dec 2019 11:44:36 +0000 (UTC) Received: (qmail 27273 invoked by alias); 21 Dec 2019 11:44:13 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45108 Received: (qmail 4833 invoked by uid 1010); 21 Dec 2019 11:44:13 -0000 X-Qmail-Scanner-Diagnostics: from out4-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25663. spamassassin: 3.4.2. Clear:RC:0(66.111.4.28):SA:0(-1.9/5.0):. Processed in 2.625723 secs); 21 Dec 2019 11:44:13 -0000 X-Envelope-From: danielsh@apache.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: softfail (ns1.primenet.com.au: transitioning SPF record at amazonses.com does not designate 66.111.4.28 as permitted sender) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdduhedgfeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhggtgfgsehtke ertdertdejnecuhfhrohhmpeffrghnihgvlhcuufhhrghhrghfuceouggrnhhivghlshhh segrphgrtghhvgdrohhrgheqnecukfhppeejledrudektddrheejrdduudelnecurfgrrh grmhepmhgrihhlfhhrohhmpegurghnihgvlhhshhesrghprggthhgvrdhorhhgnecuvehl uhhsthgvrhfuihiivgeptd X-ME-Proxy: From: Daniel Shahaf To: zsh-workers@zsh.org Subject: [PATCH 2/3] ztst.vim: Conceal the '>' or '?' on pattern expected output / expected errput lines. Date: Sat, 21 Dec 2019 11:43:30 +0000 Message-Id: <20191221114331.18294-2-danielsh@apache.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20191221114331.18294-1-danielsh@apache.org> References: <20191221114331.18294-1-danielsh@apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This aligns the expectations given by '*>' and '>' lines. --- Test/ztst.vim | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/Test/ztst.vim b/Test/ztst.vim index 3c9e0e173..842564de2 100644 --- a/Test/ztst.vim +++ b/Test/ztst.vim @@ -1,6 +1,8 @@ "" A Vim syntax highlighting file for Test/*.ztst " -" See ../Util/zyodl.vim for installation instructions +" See ../Util/zyodl.vim for installation instructions. +" Also, it's recommended to 'setlocal conceallevel=3 concealcursor=nc'. +" " See B01cd.ztst for cases we cover " TODO: Some zsh syntax isn't highlighted, e.g., «{ cd $0 }» doesn't highlight either 'cd' or '$0' @@ -10,7 +12,6 @@ " I haven't found yet a legitimate use where they aren't highlighted, but " they aren't highlighted in theoretical cases such as (( ++ZTST_skip )). " (This example is theoretical because those variables are string-typed.) -" TODO: for glob-like output/errput lines, conceal the '>' or '?' to align them with adjacent lines. "" Boilerplate: if exists("b:current_syntax") @@ -33,11 +34,18 @@ syn region ztstTestName start=// end=/$/ contained syn match ztstInputMarker /^/ nextgroup=ztstOutput contains=ztstPatternMarker + +syn match ztstOutputPattern /^[*]>/ nextgroup=ztstOutput contains=ztstOutputPatternSigil,ztstOutputPatternMarker +syn match ztstOutputPatternSigil /[*]/ contained +syn match ztstOutputPatternMarker /[>]/ contained conceal +syn match ztstOutputLiteral /^>/ nextgroup=ztstOutput syn region ztstOutput start=// end=/$/ contained -syn match ztstErrputMarker /^[*]\??/ nextgroup=ztstErrput contains=ztstPatternMarker + +syn match ztstErrputPattern /^[*][?]/ nextgroup=ztstErrput contains=ztstErrputPatternSigil,ztstErrputPatternMarker +syn match ztstErrputPatternSigil /[*]/ contained +syn match ztstErrputPatternMarker /[?]/ contained conceal +syn match ztstErrputLiteral /^[?]/ nextgroup=ztstErrput syn region ztstErrput start=// end=/$/ contained -syn match ztstPatternMarker /[*]/ contained syn match ztstFrequentExplanationMarker /^F:/ nextgroup=ztstFrequentExplanation syn region ztstFrequentExplanation start=// end=/$/ contained @@ -56,11 +64,14 @@ hi def link ztstTestName Title hi def link ztstInput Normal hi def link ztstInputMarker Ignore hi def link ztstOutput String -hi def link ztstOutputMarker Ignore +hi def link ztstOutputPatternSigil Type +hi def link ztstOutputPatternMarker Ignore +hi def link ztstOutputLiteral Ignore hi def link ztstErrput Identifier -hi def link ztstErrputMarker Ignore +hi def link ztstErrputPatternSigil Type +hi def link ztstErrputPatternMarker Ignore +hi def link ztstErrputLiteral Ignore hi def link ztstDirective Statement -hi def link ztstPatternMarker Type hi def link ztstComment Comment hi def link ztstFrequentExplanation PreProc hi def link ztstFrequentExplanationMarker Ignore