• Daniel Martí's avatar
    os: treat "${}" in Expand like in Go 1.10 · a94a390e
    Daniel Martí authored
    CL 103055 made it so that invalid parameter expansions, like "$|", did
    not make the dollar sign silently disappear.
    
    A few edge cases were not taken into account, such as "${}" and "${",
    which were now printing just "$". For consistency and to not break
    existing programs, go back to eating up the characters when invalid
    syntax is encountered.
    
    For completeness, add a "$" test case too, even though its behavior is
    unchanged by this CL.
    
    Fixes #26135.
    
    Change-Id: I5d25db9a8356dc6047a8502e318355113a99b247
    Reviewed-on: https://go-review.googlesource.com/121636
    Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
    Run-TryBot: Ian Lance Taylor <iant@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    a94a390e
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...