Skip to content

Commit 621e5ad

Browse files
committed
paragraph without dot test
1 parent c28c5a7 commit 621e5ad

File tree

4 files changed

+40
-1
lines changed

4 files changed

+40
-1
lines changed

src/main/java/io/proleap/cobol/preprocessor/sub/document/impl/CobolDocumentParserListenerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ protected String getCopyBookContent(final CopySourceContext copySource, final Co
340340
String result;
341341

342342
if (copyBook == null) {
343-
LOG.warn("Could not find copy book {} in directory of COBOL input file or copy books param.",
343+
LOG.warn("Could not find copy book {} in directory of COBOL input file or copy books param object.",
344344
copySource.getText());
345345
result = null;
346346
} else {
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package io.proleap.cobol.ast.tandem;
2+
3+
import java.io.File;
4+
5+
import io.proleap.cobol.preprocessor.CobolPreprocessor.CobolSourceFormatEnum;
6+
import io.proleap.cobol.runner.CobolParseTestRunner;
7+
import io.proleap.cobol.runner.impl.CobolParseTestRunnerImpl;
8+
import org.junit.Test;
9+
10+
public class ParagraphWithoutDotTest {
11+
12+
@Test
13+
public void test() throws Exception {
14+
final File inputFile = new File("src/test/resources/io/proleap/cobol/ast/tandem/ParagraphWithoutDot.cbl");
15+
final CobolParseTestRunner runner = new CobolParseTestRunnerImpl();
16+
runner.parseFile(inputFile, CobolSourceFormatEnum.TANDEM);
17+
}
18+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
IDENTIFICATION DIVISION.
2+
PROGRAM-ID. PARAGRAPH.
3+
PROCEDURE DIVISION.
4+
INIT
5+
STOP RUN.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
(startRule
2+
(compilationUnit
3+
(programUnit
4+
(identificationDivision IDENTIFICATION DIVISION .\n
5+
(programIdParagraph PROGRAM-ID .
6+
(programName
7+
(cobolWord PARAGRAPH)) .\n ))
8+
(procedureDivision PROCEDURE DIVISION .\n
9+
(procedureDivisionBody
10+
(paragraphs
11+
(paragraph
12+
(paragraphName
13+
(cobolWord INIT))
14+
(sentence
15+
(statement
16+
(stopStatement STOP RUN)) .))))))) <EOF>)

0 commit comments

Comments
 (0)