Golang testscript
From wikinotes
Automate filesystem based tests (given n files, run cli commands, expect x).
It was built by the core team to test the go compiler.
Documentation
official docs https://pkg.go.dev/github.com/rogpeppe/go-internal/testscript