@@ -7,6 +7,7 @@ import { test, expect } from "vitest";
7
7
const parser = setupParser ( ) ;
8
8
const uri = `source.rpgle` ;
9
9
const includeUri = `source.rpgleinc` ;
10
+ const memberIncludeUri = `/LIB/SRC/MEMBER.RPGLEINC?readonly` ;
10
11
11
12
test ( "linter_indent_multi_1" , async ( ) => {
12
13
const lines = [
@@ -3418,6 +3419,27 @@ test('Linter running on rpgleinc', async () => {
3418
3419
SpecificCasing : [ { operation : "dcl-s" , expected : `DCL-S` } ]
3419
3420
} , cache ) ;
3420
3421
3422
+ expect ( errors . length ) . toBe ( 1 ) ;
3423
+ expect ( errors [ 0 ] ) . toMatchObject ( {
3424
+ offset : { position : 7 , end : 12 } ,
3425
+ type : 'SpecificCasing' ,
3426
+ newValue : 'DCL-S'
3427
+ } ) ;
3428
+ } ) ;
3429
+
3430
+ test ( 'Linter running on member rpgleinc' , async ( ) => {
3431
+ const lines = [
3432
+ `**free` ,
3433
+ `Dcl-S CustomerName_t varchar(40) template;` ,
3434
+ ] . join ( `\n` ) ;
3435
+
3436
+ const cache = await parser . getDocs ( memberIncludeUri , lines , { ignoreCache : true , withIncludes : true } ) ;
3437
+ const { errors } = Linter . getErrors ( { uri : memberIncludeUri , content : lines } , {
3438
+ IncorrectVariableCase : true ,
3439
+ NoUnreferenced : true ,
3440
+ SpecificCasing : [ { operation : "dcl-s" , expected : `DCL-S` } ]
3441
+ } , cache ) ;
3442
+
3421
3443
expect ( errors . length ) . toBe ( 1 ) ;
3422
3444
expect ( errors [ 0 ] ) . toMatchObject ( {
3423
3445
offset : { position : 7 , end : 12 } ,
0 commit comments