@@ -52,6 +52,43 @@ export const ContentSuite: TestSuite = {
52
52
}
53
53
} ,
54
54
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
+
55
92
{
56
93
name : `Test memberResolve with bad name` , test : async ( ) => {
57
94
const content = instance . getContent ( ) ;
0 commit comments