src/testUtils: fix lost previous test function name

targetArgs mutates the testconfig.functions, that's an alias of lastTestConfig.
A better fix is probably to avoid the alias at the first place and store a complete
clone as the lastTestConfig, but I don't know how efficiently that can be done.

But anyway, mutating the configuration on the fly is not desirable. So, avoid it.

Fixes golang/vscode-go#269

Change-Id: I29651f07e555b5e604ca1c9901fc0572f3a553cf
GitHub-Last-Rev: e2297a09dc81b82f90e8044abded17ae4a816b66
GitHub-Pull-Request: golang/vscode-go#272
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/240517
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
diff --git a/src/testUtils.ts b/src/testUtils.ts
index 1f19d74..f983e0b 100644
--- a/src/testUtils.ts
+++ b/src/testUtils.ts
@@ -464,7 +464,7 @@
 			// which will result in the correct thing to happen
 			if (testFunctions.length > 0) {
 				if (testFunctions.length === 1) {
-					params = params.concat(['-run', util.format('^%s$', testFunctions.pop())]);
+					params = params.concat(['-run', util.format('^%s$', testFunctions[0])]);
 				} else {
 					params = params.concat(['-run', util.format('^(%s)$', testFunctions.join('|'))]);
 				}