From 620e7a38b7bba7450132524368c5669ebf10645a Mon Sep 17 00:00:00 2001 From: Frank Date: Fri, 22 Nov 2024 11:08:15 +0100 Subject: [PATCH] Bumped to version 5.1.0 (#185) * Bumped to version 5.1.0 * Testcase fix * Fixed Tests * Fixed Tests --- .vscode/launch.json | 1 + CHANGELOG.md | 8 + package.json | 2 +- src/clearcase.ts | 19 +-- src/test/suite/cleartool.test.ts | 270 ++++++++++++++++++++++++++++--- 5 files changed, 264 insertions(+), 36 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index aade757..b0ea4a3 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -27,6 +27,7 @@ "runtimeExecutable": "${execPath}", "args": [ "--extensionDevelopmentPath=${workspaceFolder}", + "--disable-extensions", "--extensionTestsPath=${workspaceFolder}/out/test/suite/index", "${workspaceFolder}/out" ], diff --git a/CHANGELOG.md b/CHANGELOG.md index 321a07a..6dd81c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ ## Release Notes +### 5.1.0 + +_Feature_ + +- Cleartool context menu as submenu +- Editor title commands +- Handling of internal commands + ### 5.0.0 _Feature_ diff --git a/package.json b/package.json index 2f760d2..f2e2bc7 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vscode-clearcase", "displayName": "Unofficial ClearCase SCM Commands", "description": "Unofficial support for IBM Rational ClearCase most common commands", - "version": "5.1.0-beta.1", + "version": "5.1.0", "publisher": "OpenNingia", "license": "MIT", "repository": { diff --git a/src/clearcase.ts b/src/clearcase.ts index afef08c..34e215c 100644 --- a/src/clearcase.ts +++ b/src/clearcase.ts @@ -1148,15 +1148,13 @@ export class ClearCase { // convert backslash to slash cmd.files = cmd.files.map((f) => this.wslPath(f, false)); - const outputChannel = this.outputChannel; - - outputChannel.appendLine(cmd.getCmd().toString(), LogLevel.Debug); + this.outputChannel.appendLine(cmd.getCmd().toString(), LogLevel.Debug); const command = spawn(executable, cmd.getCmd(), { cwd: cwd, env: process.env, detached: true }); // remove old running command this.killRunningCommand(cmdId, command.pid); this.mRunningCommands.set(cmdId, command); - outputChannel.appendLine(`Command ${cmdId} (${command.pid}) started`, LogLevel.Trace); + this.outputChannel.appendLine(`Command ${cmdId} (${command.pid}) started`, LogLevel.Trace); let allData: Buffer = Buffer.alloc(0); let cmdErrMsg = ""; @@ -1180,19 +1178,22 @@ export class ClearCase { }); command.on("close", (code, signal) => { - outputChannel.appendLine(`Command ${cmdId} (${command.pid}), with Signal (${signal}) deleted`, LogLevel.Trace); + this.outputChannel.appendLine( + `Command ${cmdId} (${command.pid}), with Signal (${signal}) deleted`, + LogLevel.Trace + ); if (this.mRunningCommands.has(cmdId)) { if (this.mRunningCommands.get(cmdId)?.pid === command.pid) { this.mRunningCommands.delete(cmdId); - outputChannel.appendLine(`Command ${cmdId} (${command.pid}) deleted`, LogLevel.Trace); + this.outputChannel.appendLine(`Command ${cmdId} (${command.pid}) deleted`, LogLevel.Trace); } - outputChannel.appendLine(`Command ${cmdId} (${command.pid}) finished`, LogLevel.Trace); + this.outputChannel.appendLine(`Command ${cmdId} (${command.pid}) finished`, LogLevel.Trace); } if (cmdErrMsg !== "") { // If something was printed on stderr, log it, regardless of the exit code - outputChannel.appendLine(`exit code ${code}, stderr: ${cmdErrMsg}`, LogLevel.Error); + this.outputChannel.appendLine(`exit code ${code}, stderr: ${cmdErrMsg}`, LogLevel.Error); } else { - outputChannel.appendLine(`${allData.toString()}`, LogLevel.Debug); + this.outputChannel.appendLine(`${allData.toString()}`, LogLevel.Debug); } if (code !== null && code !== 0 && this.isView && cmdErrMsg !== "") { reject(cmdErrMsg); diff --git a/src/test/suite/cleartool.test.ts b/src/test/suite/cleartool.test.ts index 2bb7392..3fcdff1 100644 --- a/src/test/suite/cleartool.test.ts +++ b/src/test/suite/cleartool.test.ts @@ -17,13 +17,19 @@ import CCOutputChannel, { LogLevel } from "../../ccOutputChannel"; const TEST_HOME = process.env["HOME"] ? process.env["HOME"] : "-"; const TEST_USER = process.env["USER"] ? process.env["USER"] : "-"; +const delayTime = async (delay: number) => { + return new Promise((resolve) => { + setTimeout(resolve, delay); + }); +}; + suite("Cleartool Commands Test Suite", () => { vscode.window.showInformationMessage("Start all tests."); let extensionContext: vscode.ExtensionContext; - let outputChannelBase: SuiteOutputChannel; - let outputChannel: CCOutputChannel; - let configHandler: CCConfigHandler; - let provider: CCScmProvider; + //let outputChannelBase: SuiteOutputChannel; + //let outputChannel: CCOutputChannel; + //let configHandler: CCConfigHandler; + //let provider: CCScmProvider; let testDir: string; before(async () => { @@ -31,8 +37,6 @@ suite("Cleartool Commands Test Suite", () => { /* eslint-disable */ extensionContext = (global as any).testExtensionContext; /* eslint-enable */ - outputChannelBase = new SuiteOutputChannel("Clearcase SCM"); - outputChannel = new CCOutputChannel(outputChannelBase); testDir = path.join(__dirname, "testfiles"); try { @@ -64,23 +68,32 @@ suite("Cleartool Commands Test Suite", () => { }); beforeEach(async () => { + // process.env["CLEARCASE_TEST_VIEWTYPE"] = "DYNAMIC"; + // outputChannelBase = new SuiteOutputChannel("Clearcase SCM"); + // outputChannel = new CCOutputChannel(outputChannelBase); + // + // configHandler = new CCConfigHandler(); + // configHandler.configuration.executable.value = path.join(__dirname, "../../../src/test/", "bin/cleartool.sh"); + // console.log("init", configHandler.configuration.executable.value); + // configHandler.configuration.logLevel.value = LogLevel.Debug; + // configHandler.configuration.useLabelAtCheckin.value = false; + // provider = new CCScmProvider(extensionContext, outputChannel, configHandler); + // await provider.init(); + // outputChannel.clear(); + // await delayTime(1000); + }); + + test("Cleartool change executable", async () => { process.env["CLEARCASE_TEST_VIEWTYPE"] = "DYNAMIC"; + const outputChannelBase = new SuiteOutputChannel("Clearcase SCM"); + const outputChannel = new CCOutputChannel(outputChannelBase); - configHandler = new CCConfigHandler(); + const configHandler = new CCConfigHandler(); configHandler.configuration.executable.value = path.join(__dirname, "../../../src/test/", "bin/cleartool.sh"); configHandler.configuration.logLevel.value = LogLevel.Debug; configHandler.configuration.useLabelAtCheckin.value = false; - provider = new CCScmProvider(extensionContext, outputChannel, configHandler); - await provider.init(); outputChannel.clear(); - return new Promise((resolve) => { - setTimeout(() => { - resolve(); - }, 100); - }); - }); - test("Cleartool change executable", () => { assert.strictEqual( configHandler.configuration.executable.value, path.join(__dirname, "../../../src/test/", "bin/cleartool.sh") @@ -88,28 +101,50 @@ suite("Cleartool Commands Test Suite", () => { }); test("Cleartool checkin file", async () => { + process.env["CLEARCASE_TEST_VIEWTYPE"] = "DYNAMIC"; + const outputChannelBase = new SuiteOutputChannel("Clearcase SCM"); + const outputChannel = new CCOutputChannel(outputChannelBase); + + const configHandler = new CCConfigHandler(); + configHandler.configuration.executable.value = path.join(__dirname, "../../../src/test/", "bin/cleartool.sh"); + configHandler.configuration.logLevel.value = LogLevel.Debug; + configHandler.configuration.useLabelAtCheckin.value = false; + const provider = new CCScmProvider(extensionContext, outputChannel, configHandler); + await provider.init(); + outputChannel.clear(); + configHandler.configuration.useClearDlg.value = false; configHandler.configuration.checkinCommand.value = "-nc ${filename}"; const file = vscode.Uri.parse(path.resolve(__dirname, "testfiles/simple01.txt")); await provider.clearCase?.checkinFile([file]); + delayTime(1000); assert.strictEqual(outputChannelBase.getLine(0), `ci,-nc,${path.join(testDir, "simple01.txt")}\n`); assert.strictEqual( - outputChannelBase.getLine(1), + outputChannelBase.getLastLine(), `Checked in "${path.join(testDir, "simple01.txt")}" version "/main/dev_01/2".\n` ); }); test("Cleartool checkout file (dynamic view)", async () => { + process.env["CLEARCASE_TEST_VIEWTYPE"] = "DYNAMIC"; + const outputChannelBase = new SuiteOutputChannel("Clearcase SCM"); + const outputChannel = new CCOutputChannel(outputChannelBase); + + const configHandler = new CCConfigHandler(); + configHandler.configuration.executable.value = path.join(__dirname, "../../../src/test/", "bin/cleartool.sh"); + configHandler.configuration.logLevel.value = LogLevel.Debug; + configHandler.configuration.useLabelAtCheckin.value = false; + const provider = new CCScmProvider(extensionContext, outputChannel, configHandler); + await provider.init(); + outputChannel.clear(); + configHandler.configuration.useClearDlg.value = false; configHandler.configuration.checkoutCommand.value = "-nc ${filename}"; const file = vscode.Uri.parse(path.resolve(__dirname, "testfiles/simple01.txt")); - - process.env["CLEARCASE_TEST_VIEWTYPE"] = "DYNAMIC"; - await provider.init(); - outputChannel.clear(); await provider.clearCase?.checkoutFile([file]); + delayTime(300); assert.strictEqual(outputChannelBase.getLine(0), `co,-nc,${path.join(testDir, "simple01.txt")}\n`); assert.strictEqual( outputChannelBase.getLine(1), @@ -118,14 +153,23 @@ suite("Cleartool Commands Test Suite", () => { }); test("Cleartool checkout file (snapshot view)", async () => { - configHandler.configuration.useClearDlg.value = false; - configHandler.configuration.checkoutCommand.value = "-nc ${filename}"; - process.env["CLEARCASE_TEST_VIEWTYPE"] = "SNAPSHOT"; + const outputChannelBase = new SuiteOutputChannel("Clearcase SCM"); + const outputChannel = new CCOutputChannel(outputChannelBase); + + const configHandler = new CCConfigHandler(); + configHandler.configuration.executable.value = path.join(__dirname, "../../../src/test/", "bin/cleartool.sh"); + configHandler.configuration.logLevel.value = LogLevel.Debug; + configHandler.configuration.useLabelAtCheckin.value = false; + const provider = new CCScmProvider(extensionContext, outputChannel, configHandler); await provider.init(); - const file = vscode.Uri.parse(path.resolve(__dirname, "testfiles/simple01.txt")); outputChannel.clear(); + + configHandler.configuration.useClearDlg.value = false; + configHandler.configuration.checkoutCommand.value = "-nc ${filename}"; + const file = vscode.Uri.parse(path.resolve(__dirname, "testfiles/simple01.txt")); await provider.clearCase?.checkoutFile([file]); + delayTime(300); assert.strictEqual(outputChannelBase.getLine(0), `co,-usehijack,-nc,${path.join(testDir, "simple01.txt")}\n`); assert.strictEqual( outputChannelBase.getLine(1), @@ -134,10 +178,23 @@ suite("Cleartool Commands Test Suite", () => { }); test("Cleartool undo checkout file (keep)", async () => { + process.env["CLEARCASE_TEST_VIEWTYPE"] = "DYNAMIC"; + const outputChannelBase = new SuiteOutputChannel("Clearcase SCM"); + const outputChannel = new CCOutputChannel(outputChannelBase); + + const configHandler = new CCConfigHandler(); + configHandler.configuration.executable.value = path.join(__dirname, "../../../src/test/", "bin/cleartool.sh"); + configHandler.configuration.logLevel.value = LogLevel.Debug; + configHandler.configuration.useLabelAtCheckin.value = false; + const provider = new CCScmProvider(extensionContext, outputChannel, configHandler); + await provider.init(); + outputChannel.clear(); + configHandler.configuration.useClearDlg.value = false; const file = vscode.Uri.parse(path.resolve(__dirname, "testfiles/simple01.txt")); await provider.clearCase?.undoCheckoutFile([file]); + delayTime(300); assert.strictEqual(outputChannelBase.getLine(0), `unco,-keep,${path.join(testDir, "simple01.txt")}\n`); assert.strictEqual( outputChannelBase.getLine(1), @@ -146,11 +203,24 @@ suite("Cleartool Commands Test Suite", () => { }); test("Cleartool undo checkout file (delete)", async () => { + process.env["CLEARCASE_TEST_VIEWTYPE"] = "DYNAMIC"; + const outputChannelBase = new SuiteOutputChannel("Clearcase SCM"); + const outputChannel = new CCOutputChannel(outputChannelBase); + + const configHandler = new CCConfigHandler(); + configHandler.configuration.executable.value = path.join(__dirname, "../../../src/test/", "bin/cleartool.sh"); + configHandler.configuration.logLevel.value = LogLevel.Debug; + configHandler.configuration.useLabelAtCheckin.value = false; + const provider = new CCScmProvider(extensionContext, outputChannel, configHandler); + await provider.init(); + outputChannel.clear(); + configHandler.configuration.useClearDlg.value = false; configHandler.configuration.uncoKeepFile.value = false; const file = vscode.Uri.parse(path.resolve(__dirname, "testfiles/simple01.txt")); await provider.clearCase?.undoCheckoutFile([file]); + delayTime(300); assert.strictEqual(outputChannelBase.getLine(0), `unco,-rm,${path.join(testDir, "simple01.txt")}\n`); assert.strictEqual( outputChannelBase.getLine(1), @@ -159,6 +229,18 @@ suite("Cleartool Commands Test Suite", () => { }); test("Cleartool checkout file already checked out", async () => { + process.env["CLEARCASE_TEST_VIEWTYPE"] = "DYNAMIC"; + const outputChannelBase = new SuiteOutputChannel("Clearcase SCM"); + const outputChannel = new CCOutputChannel(outputChannelBase); + + const configHandler = new CCConfigHandler(); + configHandler.configuration.executable.value = path.join(__dirname, "../../../src/test/", "bin/cleartool.sh"); + configHandler.configuration.logLevel.value = LogLevel.Debug; + configHandler.configuration.useLabelAtCheckin.value = false; + const provider = new CCScmProvider(extensionContext, outputChannel, configHandler); + await provider.init(); + outputChannel.clear(); + configHandler.configuration.useClearDlg.value = false; configHandler.configuration.checkoutCommand.value = "-nc ${filename}"; @@ -166,49 +248,138 @@ suite("Cleartool Commands Test Suite", () => { const fileUri = vscode.Uri.parse(file); await provider.clearCase?.checkoutFile([fileUri]); + delayTime(300); assert.strictEqual(outputChannelBase.getLine(0), `co,-nc,${file}\n`); assert.strictEqual( - outputChannelBase.getLine(1), + outputChannelBase.getLastLine(), `exit code 0, stderr: cleartool: Error: Element "${file}" is already checked out to view "myview".\n` ); }); test("Extension: Path names with environment variable", async () => { + process.env["CLEARCASE_TEST_VIEWTYPE"] = "DYNAMIC"; + const outputChannelBase = new SuiteOutputChannel("Clearcase SCM"); + const outputChannel = new CCOutputChannel(outputChannelBase); + + const configHandler = new CCConfigHandler(); + configHandler.configuration.executable.value = path.join(__dirname, "../../../src/test/", "bin/cleartool.sh"); + configHandler.configuration.logLevel.value = LogLevel.Debug; + configHandler.configuration.useLabelAtCheckin.value = false; + outputChannel.clear(); + configHandler.configuration.tempDir.value = "${env:HOME}/tmp"; assert.strictEqual(`${TEST_HOME}/tmp`, configHandler.configuration.tempDir.value); }); test("Extension: Path names with multiple environment variables", async () => { + process.env["CLEARCASE_TEST_VIEWTYPE"] = "DYNAMIC"; + const outputChannelBase = new SuiteOutputChannel("Clearcase SCM"); + const outputChannel = new CCOutputChannel(outputChannelBase); + + const configHandler = new CCConfigHandler(); + configHandler.configuration.executable.value = path.join(__dirname, "../../../src/test/", "bin/cleartool.sh"); + configHandler.configuration.logLevel.value = LogLevel.Debug; + configHandler.configuration.useLabelAtCheckin.value = false; + + outputChannel.clear(); + configHandler.configuration.tempDir.value = "${env:HOME}/tmp/${env:USER}"; assert.strictEqual(`${TEST_HOME}/tmp/${TEST_USER}`, configHandler.configuration.tempDir.value); }); test("Extension: Path names with invalid variable 1", async () => { + process.env["CLEARCASE_TEST_VIEWTYPE"] = "DYNAMIC"; + const outputChannelBase = new SuiteOutputChannel("Clearcase SCM"); + const outputChannel = new CCOutputChannel(outputChannelBase); + + const configHandler = new CCConfigHandler(); + configHandler.configuration.executable.value = path.join(__dirname, "../../../src/test/", "bin/cleartool.sh"); + configHandler.configuration.logLevel.value = LogLevel.Debug; + configHandler.configuration.useLabelAtCheckin.value = false; + + outputChannel.clear(); + configHandler.configuration.tempDir.value = "${HOME}/tmp"; assert.strictEqual("${HOME}/tmp", configHandler.configuration.tempDir.value); }); test("Extension: Path names with invalid variable 2", async () => { + process.env["CLEARCASE_TEST_VIEWTYPE"] = "DYNAMIC"; + const outputChannelBase = new SuiteOutputChannel("Clearcase SCM"); + const outputChannel = new CCOutputChannel(outputChannelBase); + + const configHandler = new CCConfigHandler(); + configHandler.configuration.executable.value = path.join(__dirname, "../../../src/test/", "bin/cleartool.sh"); + configHandler.configuration.logLevel.value = LogLevel.Debug; + configHandler.configuration.useLabelAtCheckin.value = false; + + outputChannel.clear(); + configHandler.configuration.tempDir.value = "{HOME}/tmp"; assert.strictEqual("{HOME}/tmp", configHandler.configuration.tempDir.value); }); test("Extension: Path names with invalid variable 3", async () => { + process.env["CLEARCASE_TEST_VIEWTYPE"] = "DYNAMIC"; + const outputChannelBase = new SuiteOutputChannel("Clearcase SCM"); + const outputChannel = new CCOutputChannel(outputChannelBase); + + const configHandler = new CCConfigHandler(); + configHandler.configuration.executable.value = path.join(__dirname, "../../../src/test/", "bin/cleartool.sh"); + configHandler.configuration.logLevel.value = LogLevel.Debug; + configHandler.configuration.useLabelAtCheckin.value = false; + + outputChannel.clear(); + configHandler.configuration.tempDir.value = "{env:}/tmp"; assert.strictEqual("{env:}/tmp", configHandler.configuration.tempDir.value); }); test("Extension: Path names with invalid variable 4", async () => { + process.env["CLEARCASE_TEST_VIEWTYPE"] = "DYNAMIC"; + const outputChannelBase = new SuiteOutputChannel("Clearcase SCM"); + const outputChannel = new CCOutputChannel(outputChannelBase); + + const configHandler = new CCConfigHandler(); + configHandler.configuration.executable.value = path.join(__dirname, "../../../src/test/", "bin/cleartool.sh"); + configHandler.configuration.logLevel.value = LogLevel.Debug; + configHandler.configuration.useLabelAtCheckin.value = false; + + outputChannel.clear(); + configHandler.configuration.tempDir.value = "${env:}/tmp"; assert.strictEqual("${env:}/tmp", configHandler.configuration.tempDir.value); }); test("Extension: Path names with invalid variable 5", async () => { + process.env["CLEARCASE_TEST_VIEWTYPE"] = "DYNAMIC"; + const outputChannelBase = new SuiteOutputChannel("Clearcase SCM"); + const outputChannel = new CCOutputChannel(outputChannelBase); + + const configHandler = new CCConfigHandler(); + configHandler.configuration.executable.value = path.join(__dirname, "../../../src/test/", "bin/cleartool.sh"); + configHandler.configuration.logLevel.value = LogLevel.Debug; + configHandler.configuration.useLabelAtCheckin.value = false; + + outputChannel.clear(); + configHandler.configuration.tempDir.value = "${env:}/tmp/${env:USER}"; assert.strictEqual("${env:}/tmp" + `/${TEST_USER}`, configHandler.configuration.tempDir.value); }); test("Extension: Version information of hijacked file", async () => { + process.env["CLEARCASE_TEST_VIEWTYPE"] = "DYNAMIC"; + const outputChannelBase = new SuiteOutputChannel("Clearcase SCM"); + const outputChannel = new CCOutputChannel(outputChannelBase); + + const configHandler = new CCConfigHandler(); + configHandler.configuration.executable.value = path.join(__dirname, "../../../src/test/", "bin/cleartool.sh"); + configHandler.configuration.logLevel.value = LogLevel.Debug; + configHandler.configuration.useLabelAtCheckin.value = false; + const provider = new CCScmProvider(extensionContext, outputChannel, configHandler); + await provider.init(); + outputChannel.clear(); + const file = path.join(testDir, "simple04_ro.txt"); const info = `${file}@@/main/3 [hijacked] Rule: element * A_SUPER_LABEL.0.0.1.0.1_3 [-mkbranch my_owndev]`; @@ -219,6 +390,18 @@ suite("Cleartool Commands Test Suite", () => { }); test("Extension: Version information of checkedin file", async () => { + process.env["CLEARCASE_TEST_VIEWTYPE"] = "DYNAMIC"; + const outputChannelBase = new SuiteOutputChannel("Clearcase SCM"); + const outputChannel = new CCOutputChannel(outputChannelBase); + + const configHandler = new CCConfigHandler(); + configHandler.configuration.executable.value = path.join(__dirname, "../../../src/test/", "bin/cleartool.sh"); + configHandler.configuration.logLevel.value = LogLevel.Debug; + configHandler.configuration.useLabelAtCheckin.value = false; + const provider = new CCScmProvider(extensionContext, outputChannel, configHandler); + await provider.init(); + outputChannel.clear(); + const file = path.join(testDir, "simple04_ro.txt"); const info = `${file}@@/main/testbranch_01/my_owndev/3 Rule: element * A_SUPER_LABEL.0.0.1.0.1_3 [-mkbranch my_owndev]`; @@ -229,6 +412,18 @@ suite("Cleartool Commands Test Suite", () => { }); test("Extension: Version information of checkedout file", async () => { + process.env["CLEARCASE_TEST_VIEWTYPE"] = "DYNAMIC"; + const outputChannelBase = new SuiteOutputChannel("Clearcase SCM"); + const outputChannel = new CCOutputChannel(outputChannelBase); + + const configHandler = new CCConfigHandler(); + configHandler.configuration.executable.value = path.join(__dirname, "../../../src/test/", "bin/cleartool.sh"); + configHandler.configuration.logLevel.value = LogLevel.Debug; + configHandler.configuration.useLabelAtCheckin.value = false; + const provider = new CCScmProvider(extensionContext, outputChannel, configHandler); + await provider.init(); + outputChannel.clear(); + const file = path.join(testDir, "simple04_ro.txt"); const info = `${file}@@/main/testbranch_01/my_owndev/CHECKEDOUT from /main/testbranch_01/my_owndev/0 Rule: CHECKEDOUT`; @@ -239,6 +434,18 @@ suite("Cleartool Commands Test Suite", () => { }); test("Extension: Version information of view private file", async () => { + process.env["CLEARCASE_TEST_VIEWTYPE"] = "DYNAMIC"; + const outputChannelBase = new SuiteOutputChannel("Clearcase SCM"); + const outputChannel = new CCOutputChannel(outputChannelBase); + + const configHandler = new CCConfigHandler(); + configHandler.configuration.executable.value = path.join(__dirname, "../../../src/test/", "bin/cleartool.sh"); + configHandler.configuration.logLevel.value = LogLevel.Debug; + configHandler.configuration.useLabelAtCheckin.value = false; + const provider = new CCScmProvider(extensionContext, outputChannel, configHandler); + await provider.init(); + outputChannel.clear(); + const file = path.join(testDir, "simple04_ro.txt"); const info = `${file}`; @@ -250,6 +457,17 @@ suite("Cleartool Commands Test Suite", () => { test("Extension: Version information of of empty file name string", async () => { const info = ``; + process.env["CLEARCASE_TEST_VIEWTYPE"] = "DYNAMIC"; + const outputChannelBase = new SuiteOutputChannel("Clearcase SCM"); + const outputChannel = new CCOutputChannel(outputChannelBase); + + const configHandler = new CCConfigHandler(); + configHandler.configuration.executable.value = path.join(__dirname, "../../../src/test/", "bin/cleartool.sh"); + configHandler.configuration.logLevel.value = LogLevel.Debug; + configHandler.configuration.useLabelAtCheckin.value = false; + const provider = new CCScmProvider(extensionContext, outputChannel, configHandler); + await provider.init(); + outputChannel.clear(); const version = provider.clearCase?.getVersionString(`${info}`, true); assert.strictEqual(version?.version, "not in a VOB");