@@ -6,8 +6,8 @@ suite("C code parse", () => {
66 const cwd = nativePath . resolve ( __dirname , '../../../test/resources' ) ;
77 test ( "Minimal" , ( ) => {
88 const c = nativePath . resolve ( cwd , 'hello.c' ) ;
9- const cobol = '/home/olegs/projects/gnucobol-debug/test/resources/ hello.cbl';
10- const parsed = new SourceMap ( cwd , [ c ] ) ;
9+ const cobol = nativePath . resolve ( cwd , ' hello.cbl') ;
10+ const parsed = new SourceMap ( cwd , [ c ] , [ cwd ] ) ;
1111
1212 assert . equal ( 3 , parsed . getLinesCount ( ) ) ;
1313 assert . equal ( 3 , parsed . getVariablesCount ( ) ) ;
@@ -24,8 +24,8 @@ suite("C code parse", () => {
2424 } ) ;
2525 test ( "GnuCOBOL 3.1.1" , ( ) => {
2626 const c = nativePath . resolve ( cwd , 'hello3.c' ) ;
27- const cobol = '/home/olegs/projects/gnucobol-debug/test/resources/ hello3.cbl';
28- const parsed = new SourceMap ( cwd , [ c ] ) ;
27+ const cobol = nativePath . resolve ( cwd , ' hello3.cbl') ;
28+ const parsed = new SourceMap ( cwd , [ c ] , [ cwd ] ) ;
2929
3030 assert . equal ( 3 , parsed . getLinesCount ( ) ) ;
3131 assert . equal ( 3 , parsed . getVariablesCount ( ) ) ;
@@ -47,7 +47,7 @@ suite("C code parse", () => {
4747 const cSample = nativePath . resolve ( cwd , 'sample.c' ) ;
4848 const cSubSample = nativePath . resolve ( cwd , 'subsample.c' ) ;
4949 const cSubSubSample = nativePath . resolve ( cwd , 'subsubsample.c' ) ;
50- const parsed = new SourceMap ( cwd , [ cSample , cSubSample , cSubSubSample ] ) ;
50+ const parsed = new SourceMap ( cwd , [ cSample , cSubSample , cSubSubSample ] , [ cwd ] ) ;
5151
5252 assert . equal ( 7 , parsed . getLinesCount ( ) ) ;
5353 assert . equal ( 14 , parsed . getVariablesCount ( ) ) ;
@@ -65,7 +65,7 @@ suite("C code parse", () => {
6565 } ) ;
6666 test ( "Variables Hierarchy" , ( ) => {
6767 const c = nativePath . resolve ( cwd , 'petstore.c' ) ;
68- const parsed = new SourceMap ( cwd , [ c ] ) ;
68+ const parsed = new SourceMap ( cwd , [ c ] , [ cwd ] ) ;
6969
7070 assert . equal ( 'b_14' , parsed . getVariableByCobol ( 'petstore_.WS-BILL' ) . cName ) ;
7171 assert . equal ( 'f_15' , parsed . getVariableByCobol ( 'petstore_.WS-BILL.TOTAL-QUANTITY' ) . cName ) ;
@@ -74,7 +74,7 @@ suite("C code parse", () => {
7474 } ) ;
7575 test ( "Find variables by function and COBOL name" , ( ) => {
7676 const c = nativePath . resolve ( cwd , 'petstore.c' ) ;
77- const parsed = new SourceMap ( cwd , [ c ] ) ;
77+ const parsed = new SourceMap ( cwd , [ c ] , [ cwd ] ) ;
7878
7979 assert . equal ( 'f_15' , parsed . findVariableByCobol ( 'petstore_' , 'TOTAL-QUANTITY' ) . cName ) ;
8080 assert . equal ( 'f_15' , parsed . findVariableByCobol ( 'petstore_' , 'WS-BILL.TOTAL-QUANTITY' ) . cName ) ;
@@ -85,7 +85,7 @@ suite("C code parse", () => {
8585 } ) ;
8686 test ( "Attributes" , ( ) => {
8787 const c = nativePath . resolve ( cwd , 'datatypes.c' ) ;
88- const parsed = new SourceMap ( cwd , [ c ] ) ;
88+ const parsed = new SourceMap ( cwd , [ c ] , [ cwd ] ) ;
8989
9090 for ( let variable of parsed . getVariablesByCobol ( ) ) {
9191 assert . notEqual ( variable . attribute , null ) ;
@@ -108,7 +108,7 @@ suite("C code parse", () => {
108108 } ) ;
109109 test ( "Multiple Functions" , ( ) => {
110110 const c = nativePath . resolve ( cwd , 'func.c' ) ;
111- const parsed = new SourceMap ( cwd , [ c ] ) ;
111+ const parsed = new SourceMap ( cwd , [ c ] , [ cwd ] ) ;
112112
113113 const f_6 = parsed . getVariableByC ( 'func_.f_6' ) ;
114114 assert . equal ( 'argA' , f_6 . cobolName ) ;
0 commit comments