-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '174-mocked-sections-and-paragraphs-cannot-handle-period…
…s-in-bodies' of https://github.com/openmainframeproject/cobol-check into 174-mocked-sections-and-paragraphs-cannot-handle-periods-in-bodies
- Loading branch information
Showing
22 changed files
with
440 additions
and
20 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
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
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
Binary file not shown.
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
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,21 @@ | ||
IDENTIFICATION DIVISION. | ||
PROGRAM-ID. RETURNCODE. | ||
/**************************************************************** | ||
* Program to exercise different mock statements and edge cases. | ||
***************************************************************** | ||
ENVIRONMENT DIVISION. | ||
INPUT-OUTPUT SECTION. | ||
FILE-CONTROL. | ||
DATA DIVISION. | ||
WORKING-STORAGE SECTION. | ||
01 FILLER. | ||
05 VALUE-1 PIC X(80). | ||
05 VALUE-2 PIC X(80). | ||
|
||
PROCEDURE DIVISION. | ||
|
||
000-MAKE-CALL. | ||
MOVE "arg1" to VALUE-1 | ||
MOVE "arg2" to VALUE-2 | ||
CALL 'PROG1' | ||
. |
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
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
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
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 |
---|---|---|
|
@@ -239,6 +239,7 @@ | |
. | ||
==UT==INITIALIZE. | ||
MOVE SPACES TO ==UT==FILE-INFORMATION | ||
MOVE 4 to RETURN-CODE | ||
|
||
. | ||
==UT==END. | ||
|
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
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
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,8 @@ | ||
TestSuite "Test Return Code without GOBACK in MOCK " | ||
|
||
TestCase "Return code should be 0" | ||
MOCK CALL 'PROG1' | ||
MOVE "Exit with return code 0" TO VALUE-1 | ||
END-MOCK | ||
PERFORM 000-MAKE-CALL | ||
EXPECT VALUE-1 TO BE "Exit with return code 0" |
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,9 @@ | ||
TestSuite "Test Return Code with GOBACK in MOCK " | ||
|
||
TestCase "Return code should be 4 (Should fail) " | ||
MOCK CALL 'PROG1' | ||
MOVE "Exit with return code 4" TO VALUE-1 | ||
GOBACK. | ||
END-MOCK | ||
PERFORM 000-MAKE-CALL | ||
EXPECT VALUE-1 TO BE "Exit with return code 4" |
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
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
Oops, something went wrong.