Skip to content

Commit 98d0deb

Browse files
committed
Fix tests
1 parent 6dc8edc commit 98d0deb

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

test/suite/extension.test.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,27 @@ suite('Extension Test Suite', () => {
135135
await getHaskellConfig().update('releasesDownloadStoragePath', path.normalize(getWorkspaceFile('bin').fsPath));
136136
await getHaskellConfig().update('serverEnvironment', {
137137
XDG_CACHE_HOME: path.normalize(getWorkspaceFile('cache-test').fsPath),
138+
GHCUP_INSTALL_BASE_PREFIX: getWorkspaceRoot().uri
138139
});
139140
const contents = new TextEncoder().encode('main = putStrLn "hi vscode tests"');
140141
await vscode.workspace.fs.writeFile(getWorkspaceFile('Main.hs'), contents);
141142

142143
const pred = (uri: vscode.Uri) => !['download', 'gz', 'zip'].includes(path.extname(uri.fsPath));
143144
// Setting up watchers before actual tests start, to ensure we will got the created event
144-
filesCreated.set('wrapper', existsWorkspaceFile(`bin/hls-*/haskell-language-server-wrapper*`, pred));
145-
filesCreated.set('server', existsWorkspaceFile(`bin/hls-*/haskell-language-server-[1-9]*`, pred));
145+
filesCreated.set(
146+
'wrapper',
147+
existsWorkspaceFile(
148+
`${process.platform === 'win32' ? 'ghcup' : '.ghcup'}/bin/hls-*/haskell-language-server-wrapper*`,
149+
pred
150+
)
151+
);
152+
filesCreated.set(
153+
'server',
154+
existsWorkspaceFile(
155+
`${process.platform === 'win32' ? 'ghcup' : '.ghcup'}/bin/hls-*/haskell-language-server-[1-9]*`,
156+
pred
157+
)
158+
);
146159
filesCreated.set('log', existsWorkspaceFile('hls.log'));
147160
filesCreated.set('cache', existsWorkspaceFile('cache-test'));
148161
});

0 commit comments

Comments
 (0)