diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2020-04-24 12:17:01 +0200 |
---|---|---|
committer | Tobias Klauser <tobias.klauser@gmail.com> | 2020-04-25 10:38:47 +0000 |
commit | 41e925bbcce2f0ca624f74ae4c5574dc76cb4140 (patch) | |
tree | 5b83eaeb50499f019a052c8ba0c02634b4dba07e /src/testing/testing_test.go | |
parent | 49f10f37975f0a08ac5ae320d3a29f936b56d0a9 (diff) | |
download | go-git-41e925bbcce2f0ca624f74ae4c5574dc76cb4140.tar.gz |
testing: replace all GOOS-specific path separators in TempDir
For GOOS=windows the path separator characters '\' and ':' also need be
replaced.
Updates #38465
Change-Id: If7c8cf93058c87d7df6cda140e82fd76578fe699
Reviewed-on: https://go-review.googlesource.com/c/go/+/229837
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/testing/testing_test.go')
-rw-r--r-- | src/testing/testing_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/testing/testing_test.go b/src/testing/testing_test.go index 07757a8482..1340dae5c4 100644 --- a/src/testing/testing_test.go +++ b/src/testing/testing_test.go @@ -21,6 +21,11 @@ func TestMain(m *testing.M) { func TestTempDir(t *testing.T) { testTempDir(t) t.Run("InSubtest", testTempDir) + t.Run("test/subtest", testTempDir) + t.Run("test\\subtest", testTempDir) + t.Run("test:subtest", testTempDir) + t.Run("test/..", testTempDir) + t.Run("../test", testTempDir) } func testTempDir(t *testing.T) { |