Skip to content

Commit 127e77f

Browse files
committed
Try different globbing
1 parent 6ff82fe commit 127e77f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/suite/extension.test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// tslint:disable: no-console
22
import * as assert from 'assert';
33
import * as fs from 'fs';
4-
import * as os from 'os';
4+
// import * as os from 'os';
55
import * as path from 'path';
66
import { TextEncoder } from 'util';
77
import * as vscode from 'vscode';
@@ -87,6 +87,7 @@ async function deleteFiles(dir: vscode.Uri, keepDirs: vscode.Uri[], pred?: (file
8787
}
8888
}
8989

90+
const ghcupBaseDir = `bin/${process.platform === 'win32' ? 'ghcup' : '.ghcup'}`;
9091

9192
suite('Extension Test Suite', () => {
9293
const disposables: vscode.Disposable[] = [];
@@ -124,10 +125,10 @@ suite('Extension Test Suite', () => {
124125
await vscode.workspace.fs.writeFile(getWorkspaceFile('Main.hs'), contents);
125126

126127
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' : '';
128129
// 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));
131132
filesCreated.set('log', existsWorkspaceFile('hls.log'));
132133
filesCreated.set('cache', existsWorkspaceFile('cache-test'));
133134
});

0 commit comments

Comments
 (0)