Skip to content

Commit 25cd332

Browse files
committed
Add test for member resolve with variant characters
1 parent f9b7a04 commit 25cd332

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

src/testing/content.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,43 @@ export const ContentSuite: TestSuite = {
5252
}
5353
},
5454

55+
{
56+
name: `Test memberResolve with variants`, test: async () => {
57+
const content = instance.getContent();
58+
const config = instance.getConfig();
59+
const connection = instance.getConnection();
60+
const tempLib = config!.tempLibrary,
61+
tempSPF = `O_ABC`.concat(connection!.variantChars.local),
62+
tempMbr = `O_ABC`.concat(connection!.variantChars.local);
63+
64+
const result = await connection!.runCommand({
65+
command: `CRTSRCPF ${tempLib}/${tempSPF} MBR(${tempMbr})`,
66+
environment: `ile`
67+
});
68+
69+
const member = await content?.memberResolve(tempMbr, [
70+
{ library: `QSYSINC`, name: `MIH` }, // Doesn't exist here
71+
{ library: `NOEXIST`, name: `SUP` }, // Doesn't exist here
72+
{ library: tempLib, name: tempSPF } // Doesn't exist here
73+
]);
74+
75+
assert.deepStrictEqual(member, {
76+
asp: undefined,
77+
library: tempLib,
78+
file: tempSPF,
79+
name: tempMbr,
80+
extension: `MBR`,
81+
basename: `${tempMbr}.MBR`
82+
});
83+
84+
// Cleanup...
85+
await connection!.runCommand({
86+
command: `DLTF ${tempLib}/${tempSPF}`,
87+
environment: `ile`
88+
});
89+
}
90+
},
91+
5592
{
5693
name: `Test memberResolve with bad name`, test: async () => {
5794
const content = instance.getContent();

0 commit comments

Comments
 (0)