go/src/path
Hiroshi Ioka 643c6b3c74 path/filepath: make TestToNorm robust
The old code leaves garbages in a temporary directory because it
cannot remove the current working directory on windows.
The new code changes the directory before calling os.Remove.

Furthermore, the old code assumes that ioutil.TempDir (os.TempDir)
doesn't return a relative path nor an UNC path.
If it isn't the case, the new code calls t.Fatal earlier for preventing
ambiguous errors.

Finally, the old code reassigns the variable which is used by the defer
function. It could cause unexpected results, so avoid that.

Change-Id: I5fc3902059ecaf18dc1341ecc4979d1206034cd7
Reviewed-on: https://go-review.googlesource.com/31790
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2016-10-25 01:57:05 +00:00
..
filepath path/filepath: make TestToNorm robust 2016-10-25 01:57:05 +00:00
example_test.go path, path/filepath: add Join example with joined rooted path 2016-04-03 16:55:51 +00:00
match.go all: replace strings.Index with strings.Contains where possible 2016-02-19 01:06:05 +00:00
match_test.go
path.go Rewrite leftover references to plan9.bell-labs.com to 9p.io. 2016-03-06 07:07:01 +00:00
path_test.go path: fix up bizarre test 2016-03-16 03:59:03 +00:00