Skip to content

Commit 8a04afc

Browse files
Use platform-agnostic function to compare paths
This fixes the test on Windows. For eng/ide/ada_language_server#1592
1 parent cc0071a commit 8a04afc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

integration/vscode/ada/test/general/extension.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,12 @@ suite('Extensions Test Suite', function () {
7373
// Get the workspace root folder
7474
const folder = vscode.workspace.workspaceFolders[0].uri;
7575

76-
// Check the object directory when 'for Object_Dir use "obj"' is present
76+
// Check the object directory when 'for Object_Dir use "obj"' is present
7777
// in the GPR file
7878
const originalObjDir: string = await adaExtState.getObjectDir();
79-
assert.strictEqual(originalObjDir, vscode.Uri.joinPath(folder, 'obj').fsPath);
79+
const originalObjDirURI = vscode.Uri.file(originalObjDir);
80+
81+
assert.strictEqual(originalObjDirURI.path, vscode.Uri.joinPath(folder, 'obj').path);
8082

8183
// Remove the line that specifies the object directory in the GPR file
8284
const fileUri = vscode.Uri.joinPath(folder, 'prj.gpr');
@@ -90,7 +92,7 @@ suite('Extensions Test Suite', function () {
9092
try {
9193
const objDirValue = await adaExtState.getObjectDir();
9294
const objDirURI = vscode.Uri.file(objDirValue);
93-
assert.strictEqual(objDirURI.fsPath, folder.fsPath);
95+
assert.strictEqual(objDirURI.path, folder.path);
9496
} finally {
9597
// Restore the old GPR file contents
9698
writeFileSync(fileUri.fsPath, contentBefore);

0 commit comments

Comments
 (0)