Skip to content

Commit

Permalink
Add test for object resolve with variant characters
Browse files Browse the repository at this point in the history
  • Loading branch information
chrjorgensen committed Mar 20, 2024
1 parent 25cd332 commit 03afbf8
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/testing/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,35 @@ export const ContentSuite: TestSuite = {
}
},

{
name: `Test objectResolve .DTAARA with variants`, test: async () => {
const content = instance.getContent();
const config = instance.getConfig();
const connection = instance.getConnection();
const tempLib = config!.tempLibrary,
tempObj = `O_ABC`.concat(connection!.variantChars.local);

await connection!.runCommand({
command: `CRTDTAARA ${tempLib}/${tempObj} TYPE(*CHAR)`,
environment: `ile`
});

const lib = await content?.objectResolve(tempObj, [
"QSYSINC", // Doesn't exist here
"QSYS2", // Doesn't exist here
tempLib // Does exist here
]);

assert.strictEqual(lib, tempLib);

// Cleanup...
await connection!.runCommand({
command: `DLTDTAARA ${tempLib}/${tempObj}`,
environment: `ile`
});
}
},

{
name: `Test objectResolve with bad name`, test: async () => {
const content = instance.getContent();
Expand Down

0 comments on commit 03afbf8

Please sign in to comment.