]> Cypherpunks repositories - gostls13.git/commit
testing: make TempDir work for subtests
authorAndrei Tudor Călin <mail@acln.ro>
Thu, 23 Apr 2020 01:04:33 +0000 (04:04 +0300)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 23 Apr 2020 01:34:16 +0000 (01:34 +0000)
commit952f7de3b403d2ffb45708ea5f69168bbdbfe1f0
tree4ad9bedb812d8323165bf167ada662599c5581d4
parentf049d911e93b84577577e73108605627ed522409
testing: make TempDir work for subtests

ioutil.TempDir doesn't like path separators in its pattern. Modify
(*common).TempDir to replace path separators with underscores before
using the test name as a pattern for ioutil.TempDir.

Fixes #38465.

Change-Id: I9e8ae48b99648b2bf9f561762e845165aff01972
Reviewed-on: https://go-review.googlesource.com/c/go/+/229399
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/testing/testing.go
src/testing/testing_test.go