zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] add STOUC() to casemodify() without MULTIBYTE_SUPPORT
@ 2022-04-18  7:54 Jun T
  0 siblings, 0 replies; only message in thread
From: Jun T @ 2022-04-18  7:54 UTC (permalink / raw)
  To: zsh-workers

On NetBSD, with --disable-multibyte, D01prompt.zsh fails as follows:

@@ -1 +1 @@
-
+V
Test ./D01prompt.ztst failed: output differs from expected as shown above for:
  print ${(%U)Y-%(v}
Was testing: Regression test for test on empty psvar


We need to add STOUC() in casemodify():

diff --git a/Src/hist.c b/Src/hist.c
index f9440dba7..bff0abe61 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -2254,10 +2254,10 @@ casemodify(char *str, int how)
 	    int c;
 	    int mod = 0;
 	    if (*str == Meta) {
-		c = str[1] ^ 32;
+		c = STOUC(str[1] ^ 32);
 		str += 2;
 	    } else
-		c = *str++;
+		c = STOUC(*str++);
 	    switch (how) {
 	    case CASMOD_LOWER:
 		if (isupper(c)) {




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-18  7:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-18  7:54 [PATCH] add STOUC() to casemodify() without MULTIBYTE_SUPPORT Jun T

Code repositories for project(s) associated with this 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).