go/src/os
Daniel Martí a94a390e5c os: treat "${}" in Expand like in Go 1.10
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: Ian Lance Taylor <iant@golang.org>
2018-06-29 21:07:28 +00:00
..
exec os: add js/wasm architecture 2018-06-01 05:18:38 +00:00
signal os: add js/wasm architecture 2018-06-01 05:18:38 +00:00
user os: add js/wasm architecture 2018-06-01 05:18:38 +00:00
dir.go
dir_plan9.go
dir_unix.go os: add js/wasm architecture 2018-06-01 05:18:38 +00:00
dir_windows.go os: use WIN32_FIND_DATA.Reserved0 to identify symlinks 2018-03-07 08:51:04 +00:00
env.go os: treat "${}" in Expand like in Go 1.10 2018-06-29 21:07:28 +00:00
env_test.go os: treat "${}" in Expand like in Go 1.10 2018-06-29 21:07:28 +00:00
env_unix_test.go
error.go
error_plan9.go os: homogenize error checks on Plan 9 2018-01-24 07:18:36 +00:00
error_posix.go os: add js/wasm architecture 2018-06-01 05:18:38 +00:00
error_test.go
error_unix.go os: add js/wasm architecture 2018-06-01 05:18:38 +00:00
error_unix_test.go os: add js/wasm architecture 2018-06-01 05:18:38 +00:00
error_windows.go
error_windows_test.go
example_test.go os: Add example for Expand function. 2018-05-23 15:37:22 +00:00
exec.go os/exec: document Process.Kill behaviour 2018-03-05 23:47:41 +00:00
exec_plan9.go
exec_posix.go os: add js/wasm architecture 2018-06-01 05:18:38 +00:00
exec_unix.go os: add js/wasm architecture 2018-06-01 05:18:38 +00:00
exec_windows.go
executable.go
executable_darwin.go
executable_freebsd.go
executable_path.go
executable_plan9.go
executable_procfs.go os: add js/wasm architecture 2018-06-01 05:18:38 +00:00
executable_solaris.go runtime: parse auxv for page size and executable name on Solaris 2018-04-03 15:49:45 +00:00
executable_test.go
executable_windows.go
export_test.go
export_windows_test.go
fifo_test.go os: skip TestFifoEOF on android 2018-06-14 13:41:57 +00:00
file.go os: have UserCacheDir return an error on failure 2018-06-25 18:59:39 +00:00
file_plan9.go os: document that Chown with -1 means to leave values unchanged, like POSIX 2018-04-11 23:06:44 +00:00
file_posix.go os: add js/wasm architecture 2018-06-01 05:18:38 +00:00
file_unix.go os: don't poll fifos on Darwin 2018-06-13 20:27:55 +00:00
file_windows.go os: enable symlink creation on Windows 10 2018-04-19 10:10:22 +00:00
getwd.go os: use the syscall version of Getwd for Plan 9 2018-01-25 00:12:18 +00:00
getwd_darwin.go
os_test.go os: add js/wasm architecture 2018-06-01 05:18:38 +00:00
os_unix_test.go os: use poller when NewFile is called with a blocking descriptor. 2018-04-11 17:39:11 +00:00
os_windows_test.go os: os: make Stat("*.txt") fail on windows 2018-04-27 10:04:48 +00:00
path.go os: when looping in RemoveAll, close and re-open directory 2018-06-27 22:05:25 +00:00
path_plan9.go path: use OS-specific function in MkdirAll, don't always keep trailing slash 2018-02-23 18:37:09 +00:00
path_test.go
path_unix.go os: add js/wasm architecture 2018-06-01 05:18:38 +00:00
path_windows.go path: use OS-specific function in MkdirAll, don't always keep trailing slash 2018-02-23 18:37:09 +00:00
path_windows_test.go os: make MkdirAll support path in extended-length form 2018-02-18 03:44:53 +00:00
pipe2_bsd.go os, syscall: use pipe2 instead of pipe syscall on OpenBSD 2018-02-27 18:37:36 +00:00
pipe_bsd.go os: add js/wasm architecture 2018-06-01 05:18:38 +00:00
pipe_linux.go
pipe_test.go os, net: avoid races between dup, set-blocking-mode, and closing 2018-06-22 14:27:22 +00:00
proc.go
stat.go
stat_darwin.go
stat_dragonfly.go
stat_freebsd.go
stat_linux.go
stat_nacljs.go os: add js/wasm architecture 2018-06-01 05:18:38 +00:00
stat_netbsd.go
stat_openbsd.go
stat_plan9.go os: fix TestDevNullFile on Plan 9 2018-03-27 05:30:50 +00:00
stat_solaris.go
stat_unix.go os: add js/wasm architecture 2018-06-01 05:18:38 +00:00
stat_windows.go os: treat "nul" as DevNull file on windows 2018-03-25 08:33:21 +00:00
sticky_bsd.go
sticky_notbsd.go
str.go
sys.go
sys_bsd.go os: add js/wasm architecture 2018-06-01 05:18:38 +00:00
sys_js.go os: add js/wasm architecture 2018-06-01 05:18:38 +00:00
sys_linux.go os: remove superfluous comments 2018-05-02 14:41:57 +00:00
sys_nacl.go
sys_plan9.go os: remove superfluous comments 2018-05-02 14:41:57 +00:00
sys_solaris.go
sys_unix.go all: update comment URLs from HTTP to HTTPS, where possible 2018-06-01 21:52:00 +00:00
sys_windows.go
timeout_test.go os: add js/wasm architecture 2018-06-01 05:18:38 +00:00
types.go os: add ModeIrregular flag 2018-03-29 23:17:53 +00:00
types_plan9.go
types_unix.go
types_windows.go os: os: make Stat("*.txt") fail on windows 2018-04-27 10:04:48 +00:00
wait_unimp.go os: add js/wasm architecture 2018-06-01 05:18:38 +00:00
wait_wait6.go
wait_waitid.go