* Test failure on OpenBSD @ 2016-12-08 3:26 ` Matthew Martin 2016-12-08 9:44 ` Peter Stephenson 0 siblings, 1 reply; 6+ messages in thread From: Matthew Martin @ 2016-12-08 3:26 UTC (permalink / raw) To: zsh-workers [[ $'\ua0' =~ '^.$' ]] exits non-zero on OpenBSD-current both in 5.2-test-2 and in 5.2. I swear the test was passing when I last updated the port, but the test suite hasn't changed in the mean time. Oddly on OpenBSD 5.9 and 6.0 with the packaged zsh 5.2, echo $'\ya0' errors with zsh: character not in range - Matthew Martin ./D07multibyte.ztst: starting. Testing multibyte with locale en_US.UTF-8 --- /usr/ports/pobj/zsh-5.2-test-2/zsh-5.2-test-2/tmp.ztst.68282/ztst.out Wed Dec 7 21:11:59 2016 +++ /usr/ports/pobj/zsh-5.2-test-2/zsh-5.2-test-2/tmp.ztst.68282/ztst.tout Wed Dec 7 21:11:59 2016 @@ -1,3 +1,2 @@ OK OK -OK Test ./D07multibyte.ztst failed: output differs from expected as shown above for: if zmodload zsh/regex 2>/dev/null; then [[ $'\ua0' =~ '^.$' ]] && print OK [[ $'\ua0' =~ $'^\ua0$' ]] && print OK [[ $'\ua0'X =~ '^X$' ]] || print OK else ZTST_skip="regexp library not found." fi Was testing: Ensure no confusion on metafied input to regex module ./D07multibyte.ztst: test failed. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Test failure on OpenBSD 2016-12-08 3:26 ` Test failure on OpenBSD Matthew Martin @ 2016-12-08 9:44 ` Peter Stephenson 2016-12-09 5:13 ` Matthew Martin 0 siblings, 1 reply; 6+ messages in thread From: Peter Stephenson @ 2016-12-08 9:44 UTC (permalink / raw) To: Matthew Martin, zsh-workers On Wed, 7 Dec 2016 21:26:52 -0600 Matthew Martin <phy1729@gmail.com> wrote: > [[ $'\ua0' =~ '^.$' ]] exits non-zero on OpenBSD-current both in > 5.2-test-2 and in 5.2. I swear the test was passing when I last updated > the port, but the test suite hasn't changed in the mean time. I can't think of an easy way of looking at this from here. Do you get the same from an interactive command line, and with a completely clean environment except for LANG=en_US.UTF-8 or similar? That's fairly well through the tests so it's presumably specific to what's going on in the regex library, suggesting some failure to set up internationalisation properly down there. Could some unhelpful environment variable be leaking in (that's not looked at by the main shell, so presumably not LC_ALL etc.)? Preusmably also [[ $'\ua0' == ? ]] && print OK does work or the test would have bombed out before that point. As it was already like this in 5.2 there's no point in holding up 5.3 (we can issue an update if it does get fixed any time soon), but some research in OpenBSD regex set up is probably going to be useful. pws ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Test failure on OpenBSD 2016-12-08 9:44 ` Peter Stephenson @ 2016-12-09 5:13 ` Matthew Martin 2016-12-09 8:24 ` Bart Schaefer 0 siblings, 1 reply; 6+ messages in thread From: Matthew Martin @ 2016-12-09 5:13 UTC (permalink / raw) To: zsh-workers On Thu, Dec 08, 2016 at 09:44:55AM +0000, Peter Stephenson wrote: > On Wed, 7 Dec 2016 21:26:52 -0600 > Matthew Martin <phy1729@gmail.com> wrote: > > [[ $'\ua0' =~ '^.$' ]] exits non-zero on OpenBSD-current both in > > 5.2-test-2 and in 5.2. I swear the test was passing when I last updated > > the port, but the test suite hasn't changed in the mean time. > > I can't think of an easy way of looking at this from here. Do you get > the same from an interactive command line, and with a completely clean > environment except for LANG=en_US.UTF-8 or similar? In env -i LANG=en_US.UTF-8 zsh-5.2-test-2 -f it still exits 1. > That's fairly well through the tests so it's presumably specific to > what's going on in the regex library, suggesting some failure to set up > internationalisation properly down there. Could some unhelpful > environment variable be leaking in (that's not looked at by the main > shell, so presumably not LC_ALL etc.)? > > Preusmably also > > [[ $'\ua0' == ? ]] && print OK This does exit 0. > does work or the test would have bombed out before that point. > > As it was already like this in 5.2 there's no point in holding up 5.3 > (we can issue an update if it does get fixed any time soon), but some > research in OpenBSD regex set up is probably going to be useful. That's why I tested 5.2 as well. Any tips on where to look or what is the C equivalent of [[ $'\ua0' =~ '^.$' ]] ? ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Test failure on OpenBSD 2016-12-09 5:13 ` Matthew Martin @ 2016-12-09 8:24 ` Bart Schaefer 2016-12-09 9:49 ` Peter Stephenson 0 siblings, 1 reply; 6+ messages in thread From: Bart Schaefer @ 2016-12-09 8:24 UTC (permalink / raw) To: zsh-workers [-- Attachment #1: Type: text/plain, Size: 584 bytes --] On Thu, Dec 8, 2016 at 9:13 PM, Matthew Martin <phy1729@gmail.com> wrote: > > That's why I tested 5.2 as well. Any tips on where to look or what is > the C equivalent of [[ $'\ua0' =~ '^.$' ]] ? According to http://man.openbsd.org/regex.3 -- There is one known functionality bug. The implementation of internationalization is incomplete: the locale is always assumed to be the default one of IEEE Std 1003.2 (“POSIX.2”), and only the collating elements etc. of that locale are available. Wouldn't that mean this test should be expected to fail on openbsd? ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Test failure on OpenBSD 2016-12-09 8:24 ` Bart Schaefer @ 2016-12-09 9:49 ` Peter Stephenson 2016-12-09 10:08 ` Peter Stephenson 0 siblings, 1 reply; 6+ messages in thread From: Peter Stephenson @ 2016-12-09 9:49 UTC (permalink / raw) To: zsh-workers On Fri, 9 Dec 2016 00:24:33 -0800 Bart Schaefer <schaefer@brasslantern.com> wrote: > According to http://man.openbsd.org/regex.3 -- > > There is one known functionality bug. The implementation of > internationalization > is incomplete: the locale is always assumed to be the default one of IEEE > Std > 1003.2 (“POSIX.2”), and only the collating elements etc. of that locale > are available. > > Wouldn't that mean this test should be expected to fail on openbsd? diff --git a/Test/D07multibyte.ztst b/Test/D07multibyte.ztst index 3a6e955..9a246ca 100644 --- a/Test/D07multibyte.ztst +++ b/Test/D07multibyte.ztst @@ -511,6 +511,8 @@ >OK >OK >OK +F:A failure here may indicate the system regex library does not +F:support character sets outside the portable 7-bit range. () { emulate -L zsh pws ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Test failure on OpenBSD 2016-12-09 9:49 ` Peter Stephenson @ 2016-12-09 10:08 ` Peter Stephenson 0 siblings, 0 replies; 6+ messages in thread From: Peter Stephenson @ 2016-12-09 10:08 UTC (permalink / raw) To: zsh-workers Second thoughts again... there isn't much external dependence in D07 apart from standard parts of internationali[sz]ation like locale, so it might make sense to move this test last and execute everything related to zsh's internals and the C library first. pws diff --git a/Test/D07multibyte.ztst b/Test/D07multibyte.ztst index 3a6e955..cdc070e 100644 --- a/Test/D07multibyte.ztst +++ b/Test/D07multibyte.ztst @@ -500,18 +500,6 @@ # aren't quite double width, but the arithmetic is correct. # It appears just to be an effect of the font. - if zmodload zsh/regex 2>/dev/null; then - [[ $'\ua0' =~ '^.$' ]] && print OK - [[ $'\ua0' =~ $'^\ua0$' ]] && print OK - [[ $'\ua0'X =~ '^X$' ]] || print OK - else - ZTST_skip="regexp library not found." - fi -0:Ensure no confusion on metafied input to regex module ->OK ->OK ->OK - () { emulate -L zsh setopt errreturn @@ -583,3 +571,19 @@ printf '%q%q\n' 你你 0:printf %q and quotestring and general metafy / token madness >你你 + +# This test is kept last as it introduces an additional +# dependency on the system regex library. + if zmodload zsh/regex 2>/dev/null; then + [[ $'\ua0' =~ '^.$' ]] && print OK + [[ $'\ua0' =~ $'^\ua0$' ]] && print OK + [[ $'\ua0'X =~ '^X$' ]] || print OK + else + ZTST_skip="regexp library not found." + fi +0:Ensure no confusion on metafied input to regex module +>OK +>OK +>OK +F:A failure here may indicate the system regex library does not +F:support character sets outside the portable 7-bit range. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-12-09 10:08 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CGME20161208033159epcas3p47d871ed70505af5cb760591e5cff6a00@epcas3p4.samsung.com> 2016-12-08 3:26 ` Test failure on OpenBSD Matthew Martin 2016-12-08 9:44 ` Peter Stephenson 2016-12-09 5:13 ` Matthew Martin 2016-12-09 8:24 ` Bart Schaefer 2016-12-09 9:49 ` Peter Stephenson 2016-12-09 10:08 ` Peter Stephenson
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).