diff options
| author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2018-08-20 10:15:47 +0900 |
|---|---|---|
| committer | Alex Brainman <alex.brainman@gmail.com> | 2018-08-26 04:23:19 +0000 |
| commit | b7d3e14a5296b17c940983aed0d9d6cb54b912b7 (patch) | |
| tree | 55fd7ce26d19d791651081f62766dad99dd7077f /src/path/filepath/path_test.go | |
| parent | c21ba224ec88c2a5cb01dad54f06819ed29d4ba4 (diff) | |
| download | go-b7d3e14a5296b17c940983aed0d9d6cb54b912b7.tar.xz | |
path/filepath: fix Join with Windows drive letter
Join("C:", "", "b") must return relative path "C:b"
Fixes #26953
Change-Id: I2f843ce3f9f18a1ce0e2d0f3a15233f237992776
Reviewed-on: https://go-review.googlesource.com/129758
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Diffstat (limited to 'src/path/filepath/path_test.go')
| -rw-r--r-- | src/path/filepath/path_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/path/filepath/path_test.go b/src/path/filepath/path_test.go index dde087253d..e50ee97bcb 100644 --- a/src/path/filepath/path_test.go +++ b/src/path/filepath/path_test.go @@ -271,6 +271,10 @@ var winjointests = []JoinTest{ {[]string{`C:`, `a`}, `C:a`}, {[]string{`C:`, `a\b`}, `C:a\b`}, {[]string{`C:`, `a`, `b`}, `C:a\b`}, + {[]string{`C:`, ``, `b`}, `C:b`}, + {[]string{`C:`, ``, ``, `b`}, `C:b`}, + {[]string{`C:`, ``}, `C:.`}, + {[]string{`C:`, ``, ``}, `C:.`}, {[]string{`C:.`, `a`}, `C:a`}, {[]string{`C:a`, `b`}, `C:a\b`}, {[]string{`C:a`, `b`, `d`}, `C:a\b\d`}, |
