test/unit/goDebug: delete the goDebug test
This test imports the legacy DA module in src/debugAdapter/goDebug.
Even though the tested functions look simple, loading this module
has side effect - running the debug adapter process - and this
uncleaned job makes the unit test hang.
This code remained stable for a while but was running only by the
legacy DA. We are about to delete the legacy DA. So I don't see
much value of keeping this test any longer. Remove this test.
Change-Id: I97706c7a60e101b51ff9356c7a0e958d4b44429c
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/455359
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Peter Weinberger <pjw@google.com>
diff --git a/test/unit/goDebug.test.ts b/test/unit/goDebug.test.ts
deleted file mode 100644
index 1ce6737..0000000
--- a/test/unit/goDebug.test.ts
+++ /dev/null
@@ -1,135 +0,0 @@
-/*---------------------------------------------------------
- * Copyright (C) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See LICENSE in the project root for license information.
- *--------------------------------------------------------*/
-
-import assert from 'assert';
-import { findPathSeparator, normalizeSeparators } from '../../src/debugAdapter/goDebug';
-
-suite('NormalizeSeparators Tests', () => {
- test('fix separator', () => {
- const tt = [
- {
- input: 'path/to/file',
- want: 'path/to/file'
- },
- {
- input: '\\path\\to\\file',
- want: '/path/to/file'
- },
- {
- input: '/path/to\\file',
- want: '/path/to/file'
- }
- ];
-
- for (const tc of tt) {
- const got = normalizeSeparators(tc.input);
- assert.strictEqual(got, tc.want);
- }
- });
- test('fix drive casing', () => {
- const tt = [
- {
- input: 'C:/path/to/file',
- want: 'C:/path/to/file'
- },
- {
- input: 'c:/path/to/file',
- want: 'C:/path/to/file'
- },
- {
- input: 'C:/path/to/file',
- want: 'C:/path/to/file'
- },
- {
- input: 'C:\\path\\to\\file',
- want: 'C:/path/to/file'
- },
- {
- input: 'c:\\path\\to\\file',
- want: 'C:/path/to/file'
- },
- {
- input: 'c:\\path\\to\\file',
- want: 'C:/path/to/file'
- }
- ];
-
- for (const tc of tt) {
- const got = normalizeSeparators(tc.input);
- assert.strictEqual(got, tc.want);
- }
- });
- test('relative paths', () => {
- const tt = [
- {
- input: '../path/to/file',
- want: '../path/to/file'
- },
- {
- input: './path/to/file',
- want: './path/to/file'
- },
- {
- input: '..\\path\\to\\file',
- want: '../path/to/file'
- },
- {
- input: '.\\path\\to\\file',
- want: './path/to/file'
- },
- {
- input: '/path/to/../file',
- want: '/path/to/../file'
- },
- {
- input: 'c:\\path\\to\\..\\file',
- want: 'C:/path/to/../file'
- }
- ];
-
- for (const tc of tt) {
- const got = normalizeSeparators(tc.input);
- assert.strictEqual(got, tc.want);
- }
- });
-
- test('find path separator', () => {
- const tt = [
- {
- input: '../path/to/file',
- want: '/'
- },
- {
- input: './path/to/file',
- want: '/'
- },
- {
- input: '..\\path\\to\\file',
- want: '\\'
- },
- {
- input: '.\\path\\to\\file',
- want: '\\'
- },
- {
- input: '/path/to/../file',
- want: '/'
- },
- {
- input: 'c:\\path\\to\\..\\file',
- want: '\\'
- },
- {
- input: '',
- want: '/'
- }
- ];
-
- for (const tc of tt) {
- const got = findPathSeparator(tc.input);
- assert.strictEqual(got, tc.want);
- }
- });
-});