fix: add --project/--program to BatchArgs and fix arg order in tests

BatchArgs was missing --project and --program fields, so batch commands
couldn't specify which project to use. Also fixed argument ordering in
all test files to place --project/--program after the subcommand name,
matching clap's per-subcommand argument parsing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alexander Kiselev
2026-02-05 13:19:16 -08:00
co-authored by Claude Opus 4.6
parent 1e0837dd31
commit ae2d882f26
14 changed files with 108 additions and 100 deletions
+4 -4
View File
@@ -23,12 +23,12 @@ fn test_diff_programs() {
// diff programs compares two programs by name (no --program flag needed)
Command::cargo_bin("ghidra")
.unwrap()
.arg("--project")
.arg(TEST_PROJECT)
.arg("diff")
.arg("programs")
.arg(TEST_PROGRAM)
.arg(TEST_PROGRAM)
.arg("--project")
.arg(TEST_PROJECT)
.assert()
.success();
@@ -48,12 +48,12 @@ fn test_diff_functions() {
// Using _start (entry point) for both since we just want to verify command works
Command::cargo_bin("ghidra")
.unwrap()
.arg("--project")
.arg(TEST_PROJECT)
.arg("diff")
.arg("functions")
.arg("_start")
.arg("_start")
.arg("--project")
.arg(TEST_PROJECT)
.assert()
.success();