From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Vin Shelton <acs@alumni.princeton.edu>,
zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: Re: Test Failures Latest CVS
Date: Fri, 6 Jul 2001 05:51:58 +0000 [thread overview]
Message-ID: <1010706055158.ZM9723@candle.brasslantern.com> (raw)
In-Reply-To: <m2u20qww6b.fsf@zion.rcn.com>
On Jul 5, 11:53pm, Vin Shelton wrote:
} Subject: Test Failures Latest CVS
}
} It's probably a good thing that our test suites are starting to catch
} more regressions:
}
} /usr/local/src/zsh-2001-07-05/Test/D04parameter.ztst: starting.
} *** /tmp/zsh.ztst.out.2596 Thu Jul 5 23:19:53 2001
} --- /tmp/zsh.ztst.tout.2596 Thu Jul 5 23:19:53 2001
} ***************
} *** 1,4 ****
} ! where is the white windmill, wly
} --- 1,4 ----
} ! wly
} Test /usr/local/src/zsh-2001-07-05/Test/D04parameter.ztst failed: output differs from expected as shown above for:
} print ${(S)string%%h*e}
This isn't a regression, it's an intentional change; but the test was
not brought up to date.
The question is, -should- it have been changed? The effect of 15266 is
that, with the (S) flag, ## and %% are the same, unless you use (I::);
and I think the new meaning of (I::) is even more difficult to understand
than it was to explain.
Here's before 15266:
schaefer[501] foo='where I was standing lizards crawled here and there around'
schaefer[502] print ${(S)foo%%h*ere}
where I was standing lizards crawled here and t around
schaefer[503] print ${(I:2:S)foo%%h*ere}
where I was standing lizards crawled around
schaefer[504] print ${(I:3:S)foo%%h*ere}
w around
schaefer[505] foo='where is the white windmill, whispered walter wisely'
schaefer[506] print ${(S)foo%%h*e}
where is the white windmill, wly
schaefer[507] print ${(I:2:S)foo%%h*e}
where is the wly
schaefer[508] print ${(I:3:S)foo%%h*e}
where is tly
Here's after 15266:
schaefer<501> foo='where I was standing lizards crawled here and there around'
schaefer<502> print ${(S)foo%%h*ere}
w around
schaefer<503> print ${(I:2:S)foo%%h*ere}
w and there around
schaefer<504> print ${(I:3:S)foo%%h*ere}
w I was standing lizards crawled here and there around
schaefer<505> foo='where is the white windmill, whispered walter wisely'
schaefer<506> print ${(S)foo%%h*e}
wly
schaefer<507> print ${(I:2:S)foo%%h*e}
wr wisely
schaefer<508> print ${(I:3:S)foo%%h*e}
wd walter wisely
This seems backwards to me. Indices with % and %% should count from
the end of the string leftwards, not from the beginning of the string
rightwards, and always before it has been the case that the indices are
for the -start- of the match, not for the end of it.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
next prev parent reply other threads:[~2001-07-06 5:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-06 3:53 Vin Shelton
2001-07-06 5:22 ` Andrej Borsenkow
2001-07-06 18:04 ` Clint Adams
2001-07-06 5:51 ` Bart Schaefer [this message]
2001-07-06 9:02 ` Peter Stephenson
2001-07-06 9:17 ` Peter Stephenson
2001-07-06 9:50 ` Peter Stephenson
2001-07-06 16:17 ` Bart Schaefer
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=1010706055158.ZM9723@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--cc=acs@alumni.princeton.edu \
--cc=zsh-workers@sunsite.auc.dk \
/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).