Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Test Failures Latest CVS
- X-seq: zsh-workers 15270
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Vin Shelton <acs@xxxxxxxxxxxxxxxxxxxx>, zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Re: Test Failures Latest CVS
- Date: Fri, 6 Jul 2001 05:51:58 +0000
- In-reply-to: <m2u20qww6b.fsf@xxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <m2u20qww6b.fsf@xxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author