1
0
mirror of https://github.com/golang/go synced 2024-11-15 03:50:33 -07:00
go/doc/next/6-stdlib/99-minor
Kir Kolyshkin 79ca434ac6 testing: add Chdir
Some tests need to use os.Chdir, but the use is complicated because
 - they must change back to the old working directory;
 - they must not use t.Parallel.

Add Chdir that covers these cases, and sets PWD environment variable
to the new directory for the duration of the test for Unix platforms.
Unify the panic message when t.Parallel is used together with t.Setenv
or t.Chdir.

Add some tests.

For #62516.

Change-Id: Ib050d173b26eb28a27dba5a206b2d0d877d761c1
Reviewed-on: https://go-review.googlesource.com/c/go/+/529895
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2024-08-16 23:48:50 +00:00
..
bytes bytes, strings: add Lines, SplitSeq, SplitAfterSeq, FieldsSeq, FieldsFuncSeq 2024-08-14 18:23:13 +00:00
crypto crypto/tls: expose extensions presented by client to GetCertificate 2024-08-09 18:45:11 +00:00
encoding encoding: add TextAppender and BinaryAppender 2024-07-30 14:22:50 +00:00
go/types go/types: add go1.23 iterator methods for 10 exported types 2024-07-31 22:54:09 +00:00
hash hash: implement the encoding.BinaryAppender interface 2024-08-07 17:23:15 +00:00
log/slog log/slog: implement encoding.TextAppender for Level and LevelVar 2024-08-14 14:45:28 +00:00
math/big math/big,regexp: implement the encoding.TextAppender interface 2024-08-15 23:43:00 +00:00
net/url net/url: implement encoding.BinaryAppender for URL 2024-08-08 19:43:18 +00:00
regexp math/big,regexp: implement the encoding.TextAppender interface 2024-08-15 23:43:00 +00:00
strings bytes, strings: add Lines, SplitSeq, SplitAfterSeq, FieldsSeq, FieldsFuncSeq 2024-08-14 18:23:13 +00:00
testing testing: add Chdir 2024-08-16 23:48:50 +00:00
0-heading.md doc: initialize next directory for Go 1.24 2024-07-22 17:55:04 +00:00
README doc: initialize next directory for Go 1.24 2024-07-22 17:55:04 +00:00

API changes and other small changes to the standard library go here.