1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-06-01 12:56:04 +02:00

25905: fix and test doubled-hash radix output

This commit is contained in:
Peter Stephenson 2008-10-16 09:34:51 +00:00
parent b37952c37b
commit 3c248a0de4
3 changed files with 23 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-10-16 Peter Stephenson <pws@csr.com>
* 25905: Src/math.c, Test/C01arith.ztst: fix and test doubled-hash
radix output syntax.
2008-10-14 Barton E. Schaefer <schaefer@zsh.org>
* 25887: Completion/Unix/Type/_path_files: pass -U to compadd only

View File

@ -670,7 +670,8 @@ zzlex(void)
}
if(*ptr != ']')
goto bofs;
if (outputradix < 2 || outputradix > 36) {
n = (outputradix < 0) ? -outputradix : outputradix;
if (n < 2 || n > 36) {
zerr("invalid base (must be 2 to 36 inclusive): %d",
outputradix);
return EOI;

View File

@ -172,3 +172,19 @@
print $(( 3 + "OK"); echo "Worked")
0:not a parse failure because not arithmetic
>+ OK Worked
fn() {
emulate -L zsh
print $(( [#16] 255 ))
print $(( [##16] 255 ))
setopt cbases
print $(( [#16] 255 ))
print $(( [##16] 255 ))
}
fn
0:doubled # in base removes radix
>16#FF
>FF
>0xFF
>FF