Skip to content
Open
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
33 changes: 18 additions & 15 deletions src/api/tests/suites/content.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ describe('Content Tests', { concurrent: true }, () => {
await connection.runSQL('select from qiws.qcustcdt');
expect.fail('Should have thrown an error');
} catch (e: any) {
expect(e.message).toBe('Token . was not valid. Valid tokens: , FROM INTO. (42601)');
expect(e.message.endsWith(': , FROM INTO. (42601)')).toBeTruthy();
expect(e.sqlstate).toBe('42601');
}
});
Expand Down Expand Up @@ -622,23 +622,26 @@ describe('Content Tests', { concurrent: true }, () => {
const shortName = Tools.makeid(8);
const createLib = await connection.runCommand({ command: `RUNSQL 'create schema "${longName}" for ${shortName}' commit(*none)`, noLibList: true });
if (createLib.code === 0) {
await connection.runCommand({ command: `CRTSRCPF FILE(${shortName}/SFILE) MBR(MBR) TEXT('Test long library name')` });

const libraries = await content.getLibraries({ library: `${shortName}` });
expect(libraries?.length).toBe(1);
try {
await connection.runCommand({ command: `CRTSRCPF FILE(${shortName}/SFILE) MBR(MBR) TEXT('Test long library name')` });

const objects = await content.getObjectList({ library: `${shortName}`, types: [`*SRCPF`], object: `SFILE` });
expect(objects?.length).toBe(1);
expect(objects[0].type).toBe(`*FILE`);
expect(objects[0].text).toBe(`Test long library name`);
const libraries = await content.getLibraries({ library: `${shortName}` });
expect(libraries?.length).toBe(1);

const memberCount = await content.countMembers({ library: `${shortName}`, name: `SFILE` });
expect(memberCount).toBe(1);
const members = await content.getMemberList({ library: `${shortName}`, sourceFile: `SFILE` });
const objects = await content.getObjectList({ library: `${shortName}`, types: [`*SRCPF`], object: `SFILE` });
expect(objects?.length).toBe(1);
expect(objects[0].type).toBe(`*FILE`);
expect(objects[0].text).toBe(`Test long library name`);

expect(members?.length).toBe(1);
const memberCount = await content.countMembers({ library: `${shortName}`, name: `SFILE` });
expect(memberCount).toBe(1);
const members = await content.getMemberList({ library: `${shortName}`, sourceFile: `SFILE` });

await connection.runCommand({ command: `RUNSQL 'drop schema "${longName}"' commit(*none)`, noLibList: true });
expect(members?.length).toBe(1);
}
finally {
await connection.runCommand({ command: `RUNSQL 'drop schema "${longName}"' commit(*none)`, noLibList: true });
}
} else {
throw new Error(`Failed to create schema "${longName}"`);
}
Expand Down Expand Up @@ -737,7 +740,7 @@ describe('Content Tests', { concurrent: true }, () => {
await connection.sendCommand({ command: `${connection.remoteFeatures.attr} ${directory}/${ccsid37File} CCSID=37` });
await checkFile(`${directory}/${ccsid37File}`, 37);
const files = [`${directory}/${unicodeFile}`, `${directory}/${ccsid37File}`];

expect((await connection.sendCommand({ command: `mkdir ${directory}/copy` })).code).toBe(0);
expect((await content.copy(files, `${directory}/copy`)).code).toBe(0);
expect(await content.testStreamFile(`${directory}/${unicodeFile}`, "f")).toBe(true);
Expand Down
4 changes: 4 additions & 0 deletions src/instantiate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ export async function loadAllofExtension(context: vscode.ExtensionContext) {
// Register git events based on workspace folders
if (vscode.workspace.workspaceFolders) {
setupGitEventHandler(context);
const MINIMUM_SCROLLBACK = 10000;
if(<number>vscode.workspace.getConfiguration().get('terminal.integrated.scrollback') < MINIMUM_SCROLLBACK){
vscode.workspace.getConfiguration().update('terminal.integrated.scrollback', MINIMUM_SCROLLBACK, vscode.ConfigurationTarget.Workspace);
}
}
}

Expand Down
Loading