diff --git a/src/main/java/org/openmainframeproject/cobolcheck/features/testSuiteParser/TestSuiteParser.java b/src/main/java/org/openmainframeproject/cobolcheck/features/testSuiteParser/TestSuiteParser.java index e1b5be8c..c22d8b58 100644 --- a/src/main/java/org/openmainframeproject/cobolcheck/features/testSuiteParser/TestSuiteParser.java +++ b/src/main/java/org/openmainframeproject/cobolcheck/features/testSuiteParser/TestSuiteParser.java @@ -203,12 +203,13 @@ public List getParsedTestSuiteLines(BufferedReader testSuiteReader, continue; } - if (!verifyInProgress && expectMockArguments + if (expectMockArguments && CobolVerbs.isStartOrEndCobolVerb(testSuiteToken)) { // NEW: In this case we expected cobol verbs and stop counting arguments // update the keyword as fieldname was assumed // keyword = Keywords.getKeywordFor(testSuiteToken, false); expectMockArguments = false; + expectUsing = false; handleEndOfMockStatement(testSuiteReader, testSuiteToken, false); testSuiteToken = getNextTokenFromTestSuite(testSuiteReader); continue; @@ -370,8 +371,7 @@ public List getParsedTestSuiteLines(BufferedReader testSuiteReader, currentMock.addArgument(getCallArgument(currentMockArgument, testSuiteToken)); currentMockArgument = ""; - if (testSuiteToken.endsWith(",")) - break; + } expectUsing = false; if (!verifyInProgress) {