-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding reproducible test for issue 69
- Loading branch information
1 parent
78b2779
commit 5eb306f
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
00100 IDENTIFICATION DIVISION. | ||
00200 PROGRAM-ID. MyCOBOLProgram. | ||
00300 ENVIRONMENT DIVISION. | ||
00400 CONFIGURATION SECTION. | ||
00500 SOURCE-COMPUTER. IBM-PC. | ||
00600 OBJECT-COMPUTER. IBM-PC. | ||
00700 DATA DIVISION. | ||
00800 WORKING-STORAGE SECTION. | ||
01000 01 WS-SAVE-PACKAGE PIC X(10). | ||
01200 PROCEDURE DIVISION. | ||
01500 MAIN-PROCEDURE. | ||
01600 EXEC SQL | ||
01610 SET :WS-SAVE-PACKAGE = CURRENT PACKAGESET | ||
01620 END-EXEC. | ||
01621 DISPLAY 'Current Package set: ' WS-SAVE-PACKAGE. | ||
01800 STOP RUN. |
39 changes: 39 additions & 0 deletions
39
smojol-toolkit/src/main/java/org/smojol/toolkit/examples/ExecCicsBuildMain_Issue69.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package org.smojol.toolkit.examples; | ||
|
||
import com.google.common.collect.ImmutableList; | ||
import org.smojol.common.dialect.LanguageDialect; | ||
import org.smojol.common.flowchart.FlowchartOutputFormat; | ||
import org.smojol.common.id.UUIDProvider; | ||
import org.smojol.common.resource.LocalFilesystemOperations; | ||
import org.smojol.toolkit.analysis.pipeline.BaseAnalysisModel; | ||
import org.smojol.toolkit.analysis.pipeline.ProgramSearch; | ||
import org.smojol.toolkit.analysis.task.analysis.CodeTaskRunner; | ||
import org.smojol.toolkit.interpreter.FullProgram; | ||
import org.smojol.toolkit.interpreter.structure.OccursIgnoringFormat1DataStructureBuilder; | ||
import org.smojol.toolkit.task.AnalysisTaskResult; | ||
import org.smojol.toolkit.task.AnalysisTaskResultOK; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import static org.smojol.toolkit.task.CommandLineAnalysisTask.BUILD_BASE_ANALYSIS; | ||
|
||
public class ExecCicsBuildMain_Issue69 { | ||
public static void main(String[] args) throws IOException, InterruptedException { | ||
Map<String, List<AnalysisTaskResult>> result = new CodeTaskRunner("/Users/asgupta/code/smojol/smojol-test-code", | ||
"/Users/asgupta/code/smojol/out/report", | ||
ImmutableList.of(new File("/Users/asgupta/code/smojol/smojol-test-code")), | ||
"/Users/asgupta/code/smojol/che-che4z-lsp-for-cobol-integration/server/dialect-idms/target/dialect-idms.jar", | ||
LanguageDialect.COBOL, new FullProgram(FlowchartOutputFormat.PNG, new UUIDProvider()), | ||
new UUIDProvider(), | ||
new OccursIgnoringFormat1DataStructureBuilder(), | ||
new ProgramSearch(), | ||
new LocalFilesystemOperations()) | ||
.runForPrograms(ImmutableList.of(BUILD_BASE_ANALYSIS), ImmutableList.of("exec-cics-issue-69.cbl")); | ||
AnalysisTaskResultOK ok = (AnalysisTaskResultOK) result.values().stream().toList().getFirst().getFirst(); | ||
BaseAnalysisModel base = ok.getDetail(); | ||
System.out.println("DONE"); | ||
} | ||
} |