Remove unnecessary code for running a single test
@@ -23,26 +23,18 @@ type programOut struct {
isZero bool
}
-// TestIntegrationScripts tests all programs in the tests directory
-func TestIntegrationScripts(t *testing.T) {
- var files []string
-
- // It can be painful to run all the tests all of the time. If the `T`
- // environment variable is set it will only test that specific file,
- // like:
+// TestIntegrationScripts tests all programs in the tests directory.
+//
+// It can be painful to run all the tests all of the time. You can provide a
+// regexp to run a single test:
//
- // T=tests/ctype/isalnum.c go test
+// go test -run TestIntegrationScripts/tests/ctype/isxdigit.c
//
- onlyRunSpecificFile := os.Getenv("T")
- if onlyRunSpecificFile != "" {
- files = []string{onlyRunSpecificFile}
- } else {
- var err error
- files, err = filepath.Glob("tests/*/*.c")
+func TestIntegrationScripts(t *testing.T) {
+ files, err := filepath.Glob("tests/*/*.c")
if err != nil {
t.Fatal(err)
}
- }
for _, file := range files {
// Create build folder
