-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixed bug where DECIMAL-POINT IS COMMA was not recognized nor dealt…
… with. - Added tests for DECIMAL-POINT IS COMMA - Minor refactoring Signed-off-by: David Kaan <dak@bankdata.dk>
- Loading branch information
David Kaan
committed
Feb 11, 2022
1 parent
109be56
commit 531a51c
Showing
16 changed files
with
209 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
./cobolcheck -p NUMBERS ALPHA GREETING FILECOPY MOCKTEST > approval-test-actual.txt | ||
./cobolcheck -p NUMBERS ALPHA GREETING FILECOPY MOCKTEST DPICNUMBERS > approval-test-actual.txt |
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,25 @@ | ||
IDENTIFICATION DIVISION. | ||
PROGRAM-ID. NUMBERS2. | ||
***************************************************************** | ||
* Program to exercise DECIMAL-POINT IS COMMA | ||
***************************************************************** | ||
ENVIRONMENT DIVISION. | ||
CONFIGURATION SECTION. | ||
SPECIAL-NAMES. | ||
DECIMAL-POINT IS COMMA. | ||
INPUT-OUTPUT SECTION. | ||
FILE-CONTROL. | ||
DATA DIVISION. | ||
WORKING-STORAGE SECTION. | ||
01 FILLER. | ||
05 VALUE-1 PIC Z.ZZ9,99. | ||
05 VALUE-2 PIC ZZ.ZZZ,ZZ. | ||
|
||
PROCEDURE DIVISION. | ||
|
||
100-ASSIGN. | ||
MOVE 10 TO VALUE-1 | ||
. | ||
|
||
999-END. | ||
GOBACK. |
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
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
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,13 @@ | ||
TestSuite "Verify Cobol Check handles decimal is comma properly" | ||
|
||
TestCase "simple expect for number" | ||
Move 25,74 to VALUE-1 | ||
Expect VALUE-1 = 25,74 | ||
|
||
TestCase "simple expect for number" | ||
MOCK PARAGRAPH 100-ASSIGN | ||
MOVE 105 TO VALUE-1 | ||
END-MOCK | ||
PERFORM 100-ASSIGN | ||
EXPECT VALUE-1 = 00105 | ||
VERIFY PARAGRAPH 100-ASSIGN HAPPENED ONCE |
Oops, something went wrong.