From 7ed1fb42f8d8af2d5c903d3ea43a72f78b2e52b7 Mon Sep 17 00:00:00 2001 From: xisui-MSFT <44103947+xisui-MSFT@users.noreply.github.com> Date: Tue, 28 Mar 2023 12:16:36 -0700 Subject: [PATCH] Better test name regex (#3084) * Fix accumulating test args * Better test name regex --- src/ctest.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ctest.ts b/src/ctest.ts index 79d471a9..7989963b 100644 --- a/src/ctest.ts +++ b/src/ctest.ts @@ -437,7 +437,7 @@ export class CTestDriver implements vscode.Disposable { private async runCTestImpl(driver: CMakeDriver, ctestPath: string, ctestArgs: string[], testName: string, customizedTask: boolean = false, consumer?: proc.OutputConsumer): Promise { const child = driver.executeCommand( ctestPath, - ctestArgs.concat('-R', testName), + ctestArgs.concat('-R', `^${util.escapeStringForRegex(testName)}\$`), ((customizedTask && consumer) ? consumer : new CTestOutputLogger()), { environment: await driver.getCTestCommandEnvironment(), cwd: driver.binaryDir }); const res = await child.result;