<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/cmd/internal/script/scripttest/scripttest.go, branch main</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=main</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2026-03-09T18:02:12Z</updated>
<entry>
<title>cmd/internal/test2json: generate and validate test artifacts</title>
<updated>2026-03-09T18:02:12Z</updated>
<author>
<name>Ethan Reesor</name>
<email>ethan.reesor@gmail.com</email>
</author>
<published>2024-11-16T15:54:45Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=f5e3332108dd73166a1cbe35bfebe8bf99386019'/>
<id>urn:sha1:f5e3332108dd73166a1cbe35bfebe8bf99386019</id>
<content type='text'>
Adds a mechanism for generating test2json test artifacts from and validating them against a real test. If a .test file has a corresponding .src file, TestGolden will now treat the .src file as a script test, executing it and verifying that the output matches the contents of the .test file. Running TestGolden with the -update flag will also regenerate .test files if they have a corresponding .src file.

Capturing the output of the script test in this way required making minor changes to cmd/internal/script/scripttest.

This was motivated by CL 601535 (golang/go#62728). Specifically, testing that CL required adding src/cmd/internal/test2json/testdata/frameescape.test which has a multitude of non-printing characters and thus must be generated by executing `go test`. Using a script test to generate the test file is more reliable than doing it by hand.

Change-Id: I60456700e37e21a42d0514be2ce86dc6df2bccb0
Reviewed-on: https://go-review.googlesource.com/c/go/+/628615
Reviewed-by: Michael Matloob &lt;matloob@golang.org&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Michael Matloob &lt;matloob@google.com&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
Auto-Submit: Damien Neil &lt;dneil@google.com&gt;
</content>
</entry>
<entry>
<title>all: replace calls to errors.As with errors.AsType</title>
<updated>2025-10-13T17:12:48Z</updated>
<author>
<name>Julien Cretel</name>
<email>jub0bsinthecloud@gmail.com</email>
</author>
<published>2025-10-01T20:08:18Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=6bcd97d9f4386528aa85eb3cc27da0ed902de870'/>
<id>urn:sha1:6bcd97d9f4386528aa85eb3cc27da0ed902de870</id>
<content type='text'>
This change replaces most occurrences (in code as well as in comments) of
errors.As with errors.AsType. It leaves the errors package and vendored
code untouched.

Change-Id: I3bde73f318a0b408bdb8f5a251494af15a13118a
GitHub-Last-Rev: 8aaaa36a5a12d2a6a90c6d51680464e1a3115139
GitHub-Pull-Request: golang/go#75698
Reviewed-on: https://go-review.googlesource.com/c/go/+/708495
Auto-Submit: Michael Pratt &lt;mpratt@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Alan Donovan &lt;adonovan@google.com&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
</content>
</entry>
<entry>
<title>cmd: relocate cmd/go/internal/script to cmd/internal/script</title>
<updated>2024-07-29T16:12:46Z</updated>
<author>
<name>Than McIntosh</name>
<email>thanm@google.com</email>
</author>
<published>2024-07-22T15:50:33Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=32b55eda5e6956e7ee2f913ae79e1e2a3414c9ed'/>
<id>urn:sha1:32b55eda5e6956e7ee2f913ae79e1e2a3414c9ed</id>
<content type='text'>
Relocate cmd/go's internal/script package up a level into
cmd/internal/script, so as to enable the use of script tests in
other cmd packages.  No change in functionality.

Updates #68606.

Change-Id: I3974b0bf59c76e0f459184c9f3090d6077dd5d91
Reviewed-on: https://go-review.googlesource.com/c/go/+/601358
Reviewed-by: Michael Matloob &lt;matloob@golang.org&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
</feed>
