|
1 | 1 | // tslint:disable: no-console
|
2 | 2 | import * as assert from 'assert';
|
3 | 3 | import * as fs from 'fs';
|
4 |
| -import * as os from 'os'; |
| 4 | +// import * as os from 'os'; |
5 | 5 | import * as path from 'path';
|
6 | 6 | import { TextEncoder } from 'util';
|
7 | 7 | import * as vscode from 'vscode';
|
@@ -87,6 +87,7 @@ async function deleteFiles(dir: vscode.Uri, keepDirs: vscode.Uri[], pred?: (file
|
87 | 87 | }
|
88 | 88 | }
|
89 | 89 |
|
| 90 | +const ghcupBaseDir = `bin/${process.platform === 'win32' ? 'ghcup' : '.ghcup'}`; |
90 | 91 |
|
91 | 92 | suite('Extension Test Suite', () => {
|
92 | 93 | const disposables: vscode.Disposable[] = [];
|
@@ -124,10 +125,10 @@ suite('Extension Test Suite', () => {
|
124 | 125 | await vscode.workspace.fs.writeFile(getWorkspaceFile('Main.hs'), contents);
|
125 | 126 |
|
126 | 127 | const pred = (uri: vscode.Uri) => !['download', 'gz', 'zip'].includes(path.extname(uri.fsPath));
|
127 |
| - const exeExt = os.platform.toString() === 'win32' ? '.exe' : ''; |
| 128 | + // const exeExt = os.platform.toString() === 'win32' ? '.exe' : ''; |
128 | 129 | // Setting up watchers before actual tests start, to ensure we will got the created event
|
129 |
| - filesCreated.set('wrapper', existsWorkspaceFile(`bin/${process.platform === 'win32' ? 'ghcup' : '.ghcup'}/bin/haskell-language-server-wrapper${exeExt}`, pred)); |
130 |
| - filesCreated.set('server', existsWorkspaceFile(`bin/${process.platform === 'win32' ? 'ghcup' : '.ghcup'}/bin/haskell-language-server-[1-9]*${exeExt}`, pred)); |
| 130 | + filesCreated.set('wrapper', existsWorkspaceFile(`${ghcupBaseDir}/bin/haskell-language-server-wrapper*`, pred)); |
| 131 | + filesCreated.set('server', existsWorkspaceFile(`${ghcupBaseDir}/bin/haskell-language-server-[1-9]*`, pred)); |
131 | 132 | filesCreated.set('log', existsWorkspaceFile('hls.log'));
|
132 | 133 | filesCreated.set('cache', existsWorkspaceFile('cache-test'));
|
133 | 134 | });
|
|
0 commit comments