Repository navigation
#3829: the input generator makes dates in any language and shape - #3872
Merged
Merged
Conversation
A field whose name has a date word as one of its hyphenated parts (DATE,
DATUM, FECHA, DATA, DATO, TARIKH, HIZUKE, NGAY) and is 8 or 6 bytes gets a
valid YYYYMMDD / YYMMDD; never a substring match (CANDIDATE, UPDATE-FLAG).
A case may declare a shape per field, {"date": "DD.MM.YYYY"}, text or
numeric (PIC 9(8) holds the digits as its number); a shape that does not
fit the field is an error. The English 10-byte *DATE* rule is kept, so
every existing seeded dataset is byte-identical.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3829 (epic #3819).
tests/tools/equivalence_inputs.pyused to write a date only into a field whose name containedDATEand that was 10 bytes wide. Fields namedDATUM,FECHA,DATOorDATA, and 8-byteYYYYMMDD/DDMMYYYYfields, got random letters instead. The program then took only its invalid-date path, so the equivalence proof covered less than it appeared to.What changes
DATE DATUM FECHA DATA DATO TARIKH HIZUKE NGAY. Examples:WS-FECHA-ALTA,DATUM-VON,KTO-DATO. The shape follows the width: 8 bytes givesYYYYMMDD, 6 bytes givesYYMMDD. A date word inside another word does not count, soCANDIDATE,UPDATE-FLAGandKDATOstay text."fields": {"KTO-DATUM": {"date": "DD.MM.YYYY"}}. The tokens are YYYY, YY, MM and DD; anything else is written as-is. It works on text fields and on numeric ones (PIC 9(8)holds the digits as a number). A shape that doesn't fit the field's width, or a non-digit shape on a numeric field, raises an error.DATEin its name) is kept exactly. The random draws happen in the same order, so every existing seeded dataset is byte-identical; a test pins this.Tests
tests/cobol_mainframe/test_input_dates.py.EQUIVALENCE_E2E=1with the equivalence, inputs, CICS and new date tests (Docker GnuCOBOL + JDK 17): 63 passed.pr_gates.py --fast: 5/5 pass.🤖 Generated with Claude Code