test/integration/goDebug: enable set cwd tests for dlv dap

Enable the working directory tests for dlv dap. This also
copies the value of the "cwd" attribute in the launch config
to "wd", since that is the attribute expected by dlv dap.

Change-Id: If451f5d55fa43275490407d2138d4326a558e63b
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/305532
Trust: Suzy Mueller <suzmue@golang.org>
Run-TryBot: Suzy Mueller <suzmue@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
diff --git a/src/goDebugConfiguration.ts b/src/goDebugConfiguration.ts
index 1044788..5894790 100644
--- a/src/goDebugConfiguration.ts
+++ b/src/goDebugConfiguration.ts
@@ -254,6 +254,11 @@
 			dlvDAPVersionCurrent = true;
 		}
 
+		if (debugAdapter === 'dlv-dap' && debugConfiguration['cwd']) {
+			// dlv dap expects 'wd' not 'cwd'
+			debugConfiguration['wd'] = debugConfiguration['cwd'];
+		}
+
 		if (debugConfiguration['mode'] === 'auto') {
 			debugConfiguration['mode'] =
 				activeEditor && activeEditor.document.fileName.endsWith('_test.go') ? 'test' : 'debug';
diff --git a/src/goInstallTools.ts b/src/goInstallTools.ts
index 05f3328..ab09bbf 100644
--- a/src/goInstallTools.ts
+++ b/src/goInstallTools.ts
@@ -308,7 +308,7 @@
 	const tool = getTool(toolName);
 
 	// If user has declined to install this tool, don't prompt for it.
-	return !!containsTool(declinedInstalls, tool)
+	return !!containsTool(declinedInstalls, tool);
 }
 
 export async function promptForMissingTool(toolName: string) {
diff --git a/test/integration/goDebug.test.ts b/test/integration/goDebug.test.ts
index 420d28e..81665b0 100644
--- a/test/integration/goDebug.test.ts
+++ b/test/integration/goDebug.test.ts
@@ -692,11 +692,7 @@
 	});
 
 	suite('set current working directory', () => {
-		test('should debug program with cwd set', async function () {
-			if (isDlvDap && dlvDapSkipsEnabled) {
-				this.skip(); // Fixed in https://github.com/go-delve/delve/pull/2360
-			}
-
+		test('should debug program with cwd set', async () => {
 			const WD = path.join(DATA_ROOT, 'cwdTest');
 			const PROGRAM = path.join(WD, 'cwdTest');
 			const FILE = path.join(PROGRAM, 'main.go');
@@ -735,11 +731,7 @@
 			await assertLocalVariableValue('strdat', '"Goodbye, World."');
 		});
 
-		test('should debug file program with cwd set', async function () {
-			if (isDlvDap && dlvDapSkipsEnabled) {
-				this.skip(); // Fixed in https://github.com/go-delve/delve/pull/2360
-			}
-
+		test('should debug file program with cwd set', async () => {
 			const WD = path.join(DATA_ROOT, 'cwdTest');
 			const PROGRAM = path.join(WD, 'cwdTest', 'main.go');
 			const FILE = PROGRAM;
@@ -1805,6 +1797,8 @@
 
 	async function initializeDebugConfig(config: DebugConfiguration) {
 		if (isDlvDap) {
+			config['debugAdapter'] = 'dlv-dap';
+			// Log the output for easier test debugging.
 			config['logOutput'] = 'dap';
 			config['showLog'] = true;
 		}