Add comprehensive regression test script (closes #83) - #86
Merged
Conversation
Adds test/regression.jl with two modes: - save: computes SHA256 digests of all 34 test SAS files and writes them to a digest file - compare: compares a saved baseline against fresh digests (or a second saved file) and reports DIFF/NEW/GONE per file Typical workflow: save a baseline on the parent commit, then run compare after making changes to catch any unintended data-reading regressions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
test/regression.jl— a standalone script that computes SHA256 digests of all 34 SAS7BDAT test files and supports before/after comparison to catch data-reading regressions.Usage
Exit code 0 = all match, 1 = differences found (CI-friendly).
How it works
zero_variables.sas7bdatand gracefully handles any file that fails to readFloat64→ raw IEEE-754 bytes, strings → UTF-8 + null separators, dates/datetimes →Int64epoch values)Pkg.activateonly fires when run as the entry-point scriptHow I tested this
Save mode — ran
julia test/regression.jl save /tmp/clean_baseline.txtand confirmed all 34 files were processed and the digest file written correctly.Compare mode (no change) — ran
julia test/regression.jl compare /tmp/clean_baseline.txtimmediately after; confirmed output:34 / 34 files match. All files match. No regressions detected.Compare mode (injected regression) — temporarily patched
src/SASLib.jlto add999.0to the first float value of every numeric column when readingdata_AHS2013/homimp.sas7bdat, then re-ran compare. Output:The script correctly detected the single corrupted file and reported its before/after digests.
Related
repr()-based fallback for unrecognized column types is not Julia-version-stable (low severity, unreachable with defaultreadsasargs)🤖 Generated with Claude Code