Tests: expand rpf integration tests for missing arguments and empty-TOC archives #2183
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2193"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by heditrigui on 2026-11-25T08:41:52Z.
Summary
Expands integration testing in
crates/xcl/tests/rpf_e2e.rsto cover CLI error paths, missing arguments, and empty-TOC archives:xcl rpfwithout arguments exits with code 2, prints usage help containingxcl rpf <package.rpf>to stdout, and writes nothing to stderr.xcl rpf: <path>to stderr with exit code 2.9FPRmagic reportis not an RPF9 packageto stderr with exit code 2.no records with plain names, invoke the probe summary, and exit cleanly with code 0.Tested
python -m pytest scripts/(25 passed in 0.50s).scripts/pr_check.py --local.Not tested
tests/integration suites are non-runtime code).AI use
Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T10:48:33Z.
Code review on
2df583d:rpf_missing_arguments_prints_help_and_exits_two,rpf_nonexistent_file_and_invalid_magic_report_errors, andrpf_header_with_no_records_summarizes_and_exits_zeroincrates/xcl/tests/rpf_e2e.rscleanly verifies CLI diagnostics and empty-TOC handling, with both CI checks green.Remaining before merge: Independent verification on
2df583d.Imported from ivall/xcl. Originally posted by tiagonleal on 2026-11-25T12:32:56Z.
Verification on NVIDIA RTX 5070 Ti (Windows 11), head
2df583d3aca6e2d358880ecb4e762939a51b2781Tested
2df583d3aca6e2d358880ecb4e762939a51b2781(git rev-parse HEADof a clean worktree, no local changes, built as is). The PR was open and the head unchanged when I started and again before writing this.cargo testdefault).crates/xcl/tests/rpf_e2e.rs, so I ran that target and not--lib:cargo test -p xcl --test rpf_e2e -- --test-threads=4 --nocapture: 5 passed, 0 failed, 0 ignored (about 20 s including an incremental build). Tests:rpf_missing_arguments_prints_help_and_exits_two,rpf_nonexistent_file_and_invalid_magic_report_errors,rpf_header_with_no_records_summarizes_and_exits_zero(the three new ones),full_scan_and_streaming_probe_agree_on_header_evidence,explicit_probe_rejects_conflicting_options.SKIPPEDlines in the output.Not tested
cargo test --workspace,--liband the other test targets; release profile; Developer Mode on (off here); the retail game andxcl-smoke.AI use
Run and written with Claude Code (Claude Fable 5.2 and Claude Sonnet 5.5).
Imported from ivall/xcl. Originally posted by throny on 2026-11-25T18:18:57Z.
Two contributors checked independently and found that #1718 #2075 solves the same problem in a different way: #1607, group D99. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.
This is a hint from the community triage in #1607, not a maintainer decision.
AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T20:43:24Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:34:24Z.
Triage (#1607) – head
2df583dTwo of the three tests repeat #2075 (same author, opened first): rpf_missing_arguments_prints_help_and_exits_two has the same name and body in both, and the missing-file and bad-magic test is #2075's two tests combined. If both are merged, the duplicate function name will not compile. The empty-TOC test (rpf_header_with_no_records_summarizes_and_exits_zero) is new and matches rpf.rs on main. #1718 tests the --probe paths instead.
The Tested section lists only a pytest run, no cargo test counts.
Recommendation: keep open (drop the two tests #2075 already has, or move the empty-TOC test into #2075).
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.