From 99c12e396a5638e3c05f41427205311b546ffc1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Tue, 6 Sep 2022 13:59:19 +0100 Subject: [PATCH] replace testdata/scripts/*.txt with testdata/script/*.txtar Following the best practices from upstream. In particular, the "txt" extension is somewhat ambiguous. This may cause some conflicts due to the git diff noise, but hopefully we won't ever do this again. --- main_test.go | 4 ++-- testdata/{scripts/asm.txt => script/asm.txtar} | 0 testdata/{scripts/basic.txt => script/basic.txtar} | 0 testdata/{scripts/cgo.txt => script/cgo.txtar} | 0 testdata/{scripts/crossbuild.txt => script/crossbuild.txtar} | 0 testdata/{scripts/debugdir.txt => script/debugdir.txtar} | 0 testdata/{scripts/embed.txt => script/embed.txtar} | 0 testdata/{scripts/goenv.txt => script/goenv.txtar} | 0 testdata/{scripts/gogarble.txt => script/gogarble.txtar} | 0 testdata/{scripts/goversion.txt => script/goversion.txtar} | 0 testdata/{scripts/help.txt => script/help.txtar} | 0 testdata/{scripts/implement.txt => script/implement.txtar} | 0 testdata/{scripts/imports.txt => script/imports.txtar} | 0 testdata/{scripts/init.txt => script/init.txtar} | 0 testdata/{scripts/ldflags.txt => script/ldflags.txtar} | 0 testdata/{scripts/linkname.txt => script/linkname.txtar} | 0 testdata/{scripts/literals.txt => script/literals.txtar} | 0 testdata/{scripts/modinfo.txt => script/modinfo.txtar} | 0 testdata/{scripts/plugin.txt => script/plugin.txtar} | 0 testdata/{scripts/position.txt => script/position.txtar} | 0 testdata/{scripts/reflect.txt => script/reflect.txtar} | 0 testdata/{scripts/reverse.txt => script/reverse.txtar} | 0 testdata/{scripts/seed-cache.txt => script/seed-cache.txtar} | 0 testdata/{scripts/seed.txt => script/seed.txtar} | 0 testdata/{scripts/syntax.txt => script/syntax.txtar} | 0 testdata/{scripts/test.txt => script/test.txtar} | 0 testdata/{scripts/tiny.txt => script/tiny.txtar} | 0 testdata/{scripts/typeparams.txt => script/typeparams.txtar} | 0 28 files changed, 2 insertions(+), 2 deletions(-) rename testdata/{scripts/asm.txt => script/asm.txtar} (100%) rename testdata/{scripts/basic.txt => script/basic.txtar} (100%) rename testdata/{scripts/cgo.txt => script/cgo.txtar} (100%) rename testdata/{scripts/crossbuild.txt => script/crossbuild.txtar} (100%) rename testdata/{scripts/debugdir.txt => script/debugdir.txtar} (100%) rename testdata/{scripts/embed.txt => script/embed.txtar} (100%) rename testdata/{scripts/goenv.txt => script/goenv.txtar} (100%) rename testdata/{scripts/gogarble.txt => script/gogarble.txtar} (100%) rename testdata/{scripts/goversion.txt => script/goversion.txtar} (100%) rename testdata/{scripts/help.txt => script/help.txtar} (100%) rename testdata/{scripts/implement.txt => script/implement.txtar} (100%) rename testdata/{scripts/imports.txt => script/imports.txtar} (100%) rename testdata/{scripts/init.txt => script/init.txtar} (100%) rename testdata/{scripts/ldflags.txt => script/ldflags.txtar} (100%) rename testdata/{scripts/linkname.txt => script/linkname.txtar} (100%) rename testdata/{scripts/literals.txt => script/literals.txtar} (100%) rename testdata/{scripts/modinfo.txt => script/modinfo.txtar} (100%) rename testdata/{scripts/plugin.txt => script/plugin.txtar} (100%) rename testdata/{scripts/position.txt => script/position.txtar} (100%) rename testdata/{scripts/reflect.txt => script/reflect.txtar} (100%) rename testdata/{scripts/reverse.txt => script/reverse.txtar} (100%) rename testdata/{scripts/seed-cache.txt => script/seed-cache.txtar} (100%) rename testdata/{scripts/seed.txt => script/seed.txtar} (100%) rename testdata/{scripts/syntax.txt => script/syntax.txtar} (100%) rename testdata/{scripts/test.txt => script/test.txtar} (100%) rename testdata/{scripts/tiny.txt => script/tiny.txtar} (100%) rename testdata/{scripts/typeparams.txt => script/typeparams.txtar} (100%) diff --git a/main_test.go b/main_test.go index c5afa71..e7a5bbc 100644 --- a/main_test.go +++ b/main_test.go @@ -53,7 +53,7 @@ func (m garbleMain) Run() int { var update = flag.Bool("u", false, "update testscript output files") -func TestScripts(t *testing.T) { +func TestScript(t *testing.T) { t.Parallel() execPath, err := os.Executable() @@ -62,7 +62,7 @@ func TestScripts(t *testing.T) { } p := testscript.Params{ - Dir: filepath.Join("testdata", "scripts"), + Dir: filepath.Join("testdata", "script"), Setup: func(env *testscript.Env) error { env.Vars = append(env.Vars, // Use testdata/mod as our module proxy. diff --git a/testdata/scripts/asm.txt b/testdata/script/asm.txtar similarity index 100% rename from testdata/scripts/asm.txt rename to testdata/script/asm.txtar diff --git a/testdata/scripts/basic.txt b/testdata/script/basic.txtar similarity index 100% rename from testdata/scripts/basic.txt rename to testdata/script/basic.txtar diff --git a/testdata/scripts/cgo.txt b/testdata/script/cgo.txtar similarity index 100% rename from testdata/scripts/cgo.txt rename to testdata/script/cgo.txtar diff --git a/testdata/scripts/crossbuild.txt b/testdata/script/crossbuild.txtar similarity index 100% rename from testdata/scripts/crossbuild.txt rename to testdata/script/crossbuild.txtar diff --git a/testdata/scripts/debugdir.txt b/testdata/script/debugdir.txtar similarity index 100% rename from testdata/scripts/debugdir.txt rename to testdata/script/debugdir.txtar diff --git a/testdata/scripts/embed.txt b/testdata/script/embed.txtar similarity index 100% rename from testdata/scripts/embed.txt rename to testdata/script/embed.txtar diff --git a/testdata/scripts/goenv.txt b/testdata/script/goenv.txtar similarity index 100% rename from testdata/scripts/goenv.txt rename to testdata/script/goenv.txtar diff --git a/testdata/scripts/gogarble.txt b/testdata/script/gogarble.txtar similarity index 100% rename from testdata/scripts/gogarble.txt rename to testdata/script/gogarble.txtar diff --git a/testdata/scripts/goversion.txt b/testdata/script/goversion.txtar similarity index 100% rename from testdata/scripts/goversion.txt rename to testdata/script/goversion.txtar diff --git a/testdata/scripts/help.txt b/testdata/script/help.txtar similarity index 100% rename from testdata/scripts/help.txt rename to testdata/script/help.txtar diff --git a/testdata/scripts/implement.txt b/testdata/script/implement.txtar similarity index 100% rename from testdata/scripts/implement.txt rename to testdata/script/implement.txtar diff --git a/testdata/scripts/imports.txt b/testdata/script/imports.txtar similarity index 100% rename from testdata/scripts/imports.txt rename to testdata/script/imports.txtar diff --git a/testdata/scripts/init.txt b/testdata/script/init.txtar similarity index 100% rename from testdata/scripts/init.txt rename to testdata/script/init.txtar diff --git a/testdata/scripts/ldflags.txt b/testdata/script/ldflags.txtar similarity index 100% rename from testdata/scripts/ldflags.txt rename to testdata/script/ldflags.txtar diff --git a/testdata/scripts/linkname.txt b/testdata/script/linkname.txtar similarity index 100% rename from testdata/scripts/linkname.txt rename to testdata/script/linkname.txtar diff --git a/testdata/scripts/literals.txt b/testdata/script/literals.txtar similarity index 100% rename from testdata/scripts/literals.txt rename to testdata/script/literals.txtar diff --git a/testdata/scripts/modinfo.txt b/testdata/script/modinfo.txtar similarity index 100% rename from testdata/scripts/modinfo.txt rename to testdata/script/modinfo.txtar diff --git a/testdata/scripts/plugin.txt b/testdata/script/plugin.txtar similarity index 100% rename from testdata/scripts/plugin.txt rename to testdata/script/plugin.txtar diff --git a/testdata/scripts/position.txt b/testdata/script/position.txtar similarity index 100% rename from testdata/scripts/position.txt rename to testdata/script/position.txtar diff --git a/testdata/scripts/reflect.txt b/testdata/script/reflect.txtar similarity index 100% rename from testdata/scripts/reflect.txt rename to testdata/script/reflect.txtar diff --git a/testdata/scripts/reverse.txt b/testdata/script/reverse.txtar similarity index 100% rename from testdata/scripts/reverse.txt rename to testdata/script/reverse.txtar diff --git a/testdata/scripts/seed-cache.txt b/testdata/script/seed-cache.txtar similarity index 100% rename from testdata/scripts/seed-cache.txt rename to testdata/script/seed-cache.txtar diff --git a/testdata/scripts/seed.txt b/testdata/script/seed.txtar similarity index 100% rename from testdata/scripts/seed.txt rename to testdata/script/seed.txtar diff --git a/testdata/scripts/syntax.txt b/testdata/script/syntax.txtar similarity index 100% rename from testdata/scripts/syntax.txt rename to testdata/script/syntax.txtar diff --git a/testdata/scripts/test.txt b/testdata/script/test.txtar similarity index 100% rename from testdata/scripts/test.txt rename to testdata/script/test.txtar diff --git a/testdata/scripts/tiny.txt b/testdata/script/tiny.txtar similarity index 100% rename from testdata/scripts/tiny.txt rename to testdata/script/tiny.txtar diff --git a/testdata/scripts/typeparams.txt b/testdata/script/typeparams.txtar similarity index 100% rename from testdata/scripts/typeparams.txt rename to testdata/script/typeparams.txtar