From a6f3c65d6cdbe07b7262a6199baaa10700d5bb4e Mon Sep 17 00:00:00 2001 From: Lars Egeberg Hansen Date: Fri, 15 Dec 2023 08:44:31 +0100 Subject: [PATCH 1/4] Testing --- vs-code-extension/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vs-code-extension/package.json b/vs-code-extension/package.json index a34c8d4c..efb5ba03 100644 --- a/vs-code-extension/package.json +++ b/vs-code-extension/package.json @@ -8,7 +8,7 @@ "Snippets" ], "description": "Extension for running unit tests in Cobol", - "version": "0.4.2", + "version": "0.4.3", "icon": "images/cobol-check-logo-small.png", "repository": { "type": "git", From 086132f9b06a97de255f215613276a3eb7442559 Mon Sep 17 00:00:00 2001 From: Lars Egeberg Hansen Date: Fri, 15 Dec 2023 08:45:06 +0100 Subject: [PATCH 2/4] Testing --- vs-code-extension/client/src/extension.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/vs-code-extension/client/src/extension.ts b/vs-code-extension/client/src/extension.ts index feb44c84..0fc7cf83 100644 --- a/vs-code-extension/client/src/extension.ts +++ b/vs-code-extension/client/src/extension.ts @@ -32,6 +32,7 @@ export async function activate(context: ExtensionContext) { const fileChangedEmitter = new vscode.EventEmitter(); + // let runCobolCheck_Cmd = vscode.commands.registerCommand('cobolcheck.run', (pathToExpandedProgram : string) => { let runCobolCheck_Cmd = vscode.commands.registerCommand('cobolcheck.run', () => { //Setting loader vscode.window.withProgress({location: vscode.ProgressLocation.Notification, cancellable: true, title: 'Cobol Check running:'}, @@ -41,7 +42,15 @@ export async function activate(context: ExtensionContext) { //Getting arguments to run let applicationSourceDir = await getConfigurationValueFor(configPath, 'application.source.directory'); - let argument : string = getCobolCheckRunArgumentsBasedOnCurrentFile(externalVsCodeInstallationDir, configPath, applicationSourceDir, vscode.window.activeTextEditor.document.uri.fsPath); + // let argument : string = '' + // console.log("Cobol-check extention: pathToExpandedProgram=" + pathToExpandedProgram) + // if(pathToExpandedProgram === undefined) { + let argument : string = getCobolCheckRunArgumentsBasedOnCurrentFile(externalVsCodeInstallationDir, configPath, applicationSourceDir, vscode.window.activeTextEditor.document.uri.fsPath); + // } + // else { + // argument = getCobolCheckRunArgumentsBasedOnCurrentFile(externalVsCodeInstallationDir, configPath, applicationSourceDir, pathToExpandedProgram); + // } + // console.log("Cobol-check extention: argument=" + argument) if (argument === null) return; progress.report({ message: 'Running tests' }) From 7cec9d25fd0fbb5daa1246c7fcfc90ef88cbbf98 Mon Sep 17 00:00:00 2001 From: Lars Egeberg Hansen Date: Tue, 19 Dec 2023 16:21:12 +0100 Subject: [PATCH 3/4] Now unit test can run with or without input file. --- vs-code-extension/client/src/extension.ts | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/vs-code-extension/client/src/extension.ts b/vs-code-extension/client/src/extension.ts index 0fc7cf83..20e3bc64 100644 --- a/vs-code-extension/client/src/extension.ts +++ b/vs-code-extension/client/src/extension.ts @@ -32,8 +32,7 @@ export async function activate(context: ExtensionContext) { const fileChangedEmitter = new vscode.EventEmitter(); - // let runCobolCheck_Cmd = vscode.commands.registerCommand('cobolcheck.run', (pathToExpandedProgram : string) => { - let runCobolCheck_Cmd = vscode.commands.registerCommand('cobolcheck.run', () => { + let runCobolCheck_Cmd = vscode.commands.registerCommand('cobolcheck.run', (pathToExpandedProgram : string) => { //Setting loader vscode.window.withProgress({location: vscode.ProgressLocation.Notification, cancellable: true, title: 'Cobol Check running:'}, async (progress) => { @@ -42,15 +41,15 @@ export async function activate(context: ExtensionContext) { //Getting arguments to run let applicationSourceDir = await getConfigurationValueFor(configPath, 'application.source.directory'); - // let argument : string = '' - // console.log("Cobol-check extention: pathToExpandedProgram=" + pathToExpandedProgram) - // if(pathToExpandedProgram === undefined) { - let argument : string = getCobolCheckRunArgumentsBasedOnCurrentFile(externalVsCodeInstallationDir, configPath, applicationSourceDir, vscode.window.activeTextEditor.document.uri.fsPath); - // } - // else { - // argument = getCobolCheckRunArgumentsBasedOnCurrentFile(externalVsCodeInstallationDir, configPath, applicationSourceDir, pathToExpandedProgram); - // } - // console.log("Cobol-check extention: argument=" + argument) + let argument : string = null + console.log("Cobol-check extention: pathToExpandedProgram=" + pathToExpandedProgram) + if(pathToExpandedProgram === undefined) { + argument = getCobolCheckRunArgumentsBasedOnCurrentFile(externalVsCodeInstallationDir, configPath, applicationSourceDir, vscode.window.activeTextEditor.document.uri.fsPath); + } + else { + argument = getCobolCheckRunArgumentsBasedOnCurrentFile(externalVsCodeInstallationDir, configPath, applicationSourceDir, pathToExpandedProgram); + } + console.log("Cobol-check extention: argument=" + argument) if (argument === null) return; progress.report({ message: 'Running tests' }) From e18610dbd51bc3a16e2e1da9817560a469d5418c Mon Sep 17 00:00:00 2001 From: Lars Egeberg Hansen Date: Fri, 29 Dec 2023 10:33:49 +0100 Subject: [PATCH 4/4] Dummy change/Sign off Signed-off-by: Lars Egeberg Hansen --- vs-code-extension/client/src/extension.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vs-code-extension/client/src/extension.ts b/vs-code-extension/client/src/extension.ts index 20e3bc64..6f6e183b 100644 --- a/vs-code-extension/client/src/extension.ts +++ b/vs-code-extension/client/src/extension.ts @@ -1,4 +1,4 @@ -// The module 'vscode' contains the VS Code extensibility API +// The module 'vscode' contains the VS Code extensibility API // Import the module and reference it with the alias vscode in your code below //Include files ved byg/udgivelse?