Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,35 @@
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}" ],
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": [ "${workspaceRoot}/out/src/**/*.js" ],
"outFiles": [
"${workspaceFolder}/out/src/**/*.js"
],
"preLaunchTask": "npm"
},
{
"name": "Launch Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["test/resources/sample.f90","--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/test" ],
"env": {
"CODE_TESTS_WORKSPACE": "./"
},
"args": [
"test/resources/sample.f90",
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test"
],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": [ "${workspaceRoot}/out/test/**/*.js" ],
"preLaunchTask": "npm"
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
]
}
]
}
}
7 changes: 3 additions & 4 deletions test/extension.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@

// The module 'assert' provides assertion methods from node
import * as assert from "assert";
import * as fs from "fs";

// You can import and use all API from the 'vscode' module
// as well as import your extension to test it
import * as vscode from "vscode";
import * as myExtension from "../src/extension";
import * as path from 'path';
import { FortranDocumentSymbolProvider } from "../src/features/document-symbol-provider";

// Defines a Mocha test suite to group tests of similar kind together
suite("Extension Tests", () => {
test("symbol provider works as expected", async () => {
const filePath = "/test/resources/sample.f90";
const openPath = vscode.Uri.file(`${vscode.workspace.rootPath}${filePath}`);
const filePath = path.resolve(__dirname, "../../test/resources/sample.f90");
const openPath = vscode.Uri.file(filePath);
const doc = await vscode.workspace.openTextDocument(openPath);
vscode.window.showTextDocument(doc);
const symbolProvider = new FortranDocumentSymbolProvider();
Expand Down