summaryrefslogtreecommitdiffhomepage
path: root/test/runtimes/nodejs
diff options
context:
space:
mode:
authorBrett Landau <brettlandau@google.com>2019-08-09 15:34:44 -0700
committergVisor bot <gvisor-bot@google.com>2019-08-09 15:35:58 -0700
commitf2762e8c60b0a83f976c9eedd4a8c08e32cb6856 (patch)
tree1da65dc39e6725e87653638b170bf4547c569f3b /test/runtimes/nodejs
parent5a38eb120abe0aecd4b64cf9e3a9e1ff1dc0edd7 (diff)
Create tests for common.Search().
Using the path_test.go file built by the Golang devs as a base, tests have been created to verify the functionality of common.Search(). A mock file system is created and fake test files are generated to see if they get picked up by common.Search(). Also included in this CL is a bug fix for proctor-nodejs that was discovered using this test. proctor-nodejs used to allow multiple "-" in its test name filter. The regex has been updated to prevent this. PiperOrigin-RevId: 262647263
Diffstat (limited to 'test/runtimes/nodejs')
-rw-r--r--test/runtimes/nodejs/proctor-nodejs.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/runtimes/nodejs/proctor-nodejs.go b/test/runtimes/nodejs/proctor-nodejs.go
index 5f21e046b..0624f6a0d 100644
--- a/test/runtimes/nodejs/proctor-nodejs.go
+++ b/test/runtimes/nodejs/proctor-nodejs.go
@@ -29,7 +29,7 @@ import (
var (
dir = os.Getenv("LANG_DIR")
testDir = filepath.Join(dir, "test")
- testRegEx = regexp.MustCompile(`^test-.+\.js$`)
+ testRegEx = regexp.MustCompile(`^test-[^-].+\.js$`)
)
type nodejsRunner struct {