diff --git a/testscript/testscript.go b/testscript/testscript.go index 20b6e1f2..089e1038 100644 --- a/testscript/testscript.go +++ b/testscript/testscript.go @@ -413,6 +413,9 @@ func writeFile(name string, data []byte, perm fs.FileMode, excl bool) error { return nil } +// Name returns the short name or basename of the test script. +func (ts *TestScript) Name() string { return ts.name } + // setup sets up the test execution temporary directory and environment. // It returns the comment section of the txtar archive. func (ts *TestScript) setup() string {