Skip to content

Commit

Permalink
paragraph without dot test
Browse files Browse the repository at this point in the history
  • Loading branch information
uwol committed Jan 1, 2018
1 parent c28c5a7 commit 621e5ad
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ protected String getCopyBookContent(final CopySourceContext copySource, final Co
String result;

if (copyBook == null) {
LOG.warn("Could not find copy book {} in directory of COBOL input file or copy books param.",
LOG.warn("Could not find copy book {} in directory of COBOL input file or copy books param object.",
copySource.getText());
result = null;
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package io.proleap.cobol.ast.tandem;

import java.io.File;

import io.proleap.cobol.preprocessor.CobolPreprocessor.CobolSourceFormatEnum;
import io.proleap.cobol.runner.CobolParseTestRunner;
import io.proleap.cobol.runner.impl.CobolParseTestRunnerImpl;
import org.junit.Test;

public class ParagraphWithoutDotTest {

@Test
public void test() throws Exception {
final File inputFile = new File("src/test/resources/io/proleap/cobol/ast/tandem/ParagraphWithoutDot.cbl");
final CobolParseTestRunner runner = new CobolParseTestRunnerImpl();
runner.parseFile(inputFile, CobolSourceFormatEnum.TANDEM);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
IDENTIFICATION DIVISION.
PROGRAM-ID. PARAGRAPH.
PROCEDURE DIVISION.
INIT
STOP RUN.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
(startRule
(compilationUnit
(programUnit
(identificationDivision IDENTIFICATION DIVISION .\n
(programIdParagraph PROGRAM-ID .
(programName
(cobolWord PARAGRAPH)) .\n ))
(procedureDivision PROCEDURE DIVISION .\n
(procedureDivisionBody
(paragraphs
(paragraph
(paragraphName
(cobolWord INIT))
(sentence
(statement
(stopStatement STOP RUN)) .))))))) <EOF>)

0 comments on commit 621e5ad

Please sign in to comment.