mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-19 11:31:26 +01:00
25905: fix and test doubled-hash radix output
This commit is contained in:
parent
b37952c37b
commit
3c248a0de4
3 changed files with 23 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue