Use regex to properly select Go test runnable (#13750)
This is already done when selecting a subtest; by wrapping the test name with `^{}$` the runnable will avoid selecting additional tests with the same prefix. Without this fix, selecting the runnable for `TestExample` will also run `TestExample2`. Release Notes: - Fixed Golang tasks spawning tests starting with the current function name and not using the exact match.
This commit is contained in:
parent
48763d0663
commit
38fb841d1f
1 changed files with 1 additions and 1 deletions
|
@ -518,7 +518,7 @@ impl ContextProvider for GoContextProvider {
|
||||||
"test".into(),
|
"test".into(),
|
||||||
GO_PACKAGE_TASK_VARIABLE.template_value(),
|
GO_PACKAGE_TASK_VARIABLE.template_value(),
|
||||||
"-run".into(),
|
"-run".into(),
|
||||||
VariableName::Symbol.template_value(),
|
format!("^{}$", VariableName::Symbol.template_value(),),
|
||||||
],
|
],
|
||||||
tags: vec!["go-test".to_owned()],
|
tags: vec!["go-test".to_owned()],
|
||||||
..TaskTemplate::default()
|
..TaskTemplate::default()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue