mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-11-15 09:11:33 +00:00
test(cobol): fix Mixed.CPY integration test for P1-A behavior
The integration test in cobol-import-index-reuse.test.ts had outdated expectations from before P1-A. With P1-A, path.basename uses the raw extension, so Mixed.CPY is now keyed as MIXED (extension stripped). Before (pre-P1-A): - Mixed.CPY → keyed as MIXED.CPY (uppercase ext not stripped) - COPY MIXED.CPY → found, COPY MIXED → null After (P1-A): - Mixed.CPY → keyed as MIXED (raw ext stripped) - COPY MIXED → found, COPY MIXED.CPY → null Updated test expectations to match P1-A behavior. All three validation tests now pass: - cobol-import-index-reuse.test.ts (integration, index reuse) - cobol-copy-external-imports.test.ts (processor P1-A/P1-B pins) - cobol-import-target-parity.test.ts (resolver parity) Fixes PER-994 CI failure on abhigyanpatwari/GitNexus#3240. Co-authored-by: Kevin Rajan <kvnloo@users.noreply.github.com>
This commit is contained in:
parent
0ce6443755
commit
e883b2de04
1 changed files with 3 additions and 5 deletions
|
|
@ -118,11 +118,9 @@ describe('COBOL COPY resolution — index reuse across imports (#2908)', () => {
|
|||
// Source tier, reached only after every copybook missed.
|
||||
expect(resolveImportTarget('PAYROLL', FROM_FILE, files, undefined)).toBe('src/PAYROLL.cob');
|
||||
expect(resolveImportTarget('TAXCALC', FROM_FILE, files, undefined)).toBe('src/TAXCALC.cobol');
|
||||
// `path.basename(fp, '.cpy')` will not strip `.CPY`, so the stem keeps it.
|
||||
expect(resolveImportTarget('MIXED.CPY', FROM_FILE, files, undefined)).toBe(
|
||||
'copybooks/Mixed.CPY',
|
||||
);
|
||||
expect(resolveImportTarget('MIXED', FROM_FILE, files, undefined)).toBeNull();
|
||||
// P1-A: raw extension stripped, so `Mixed.CPY` keys as `MIXED`.
|
||||
expect(resolveImportTarget('MIXED', FROM_FILE, files, undefined)).toBe('copybooks/Mixed.CPY');
|
||||
expect(resolveImportTarget('MIXED.CPY', FROM_FILE, files, undefined)).toBeNull();
|
||||
// Neither tier: a `.txt`, a file with no extension, and an absent member.
|
||||
expect(resolveImportTarget('NOEXT', FROM_FILE, files, undefined)).toBeNull();
|
||||
expect(resolveImportTarget('ABSENT', FROM_FILE, files, undefined)).toBeNull();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue