Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/cli/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,24 @@ mod tests {
assert_eq!(args.contract.to_str().unwrap(), "contract.wasm");
assert_eq!(args.network_snapshot.unwrap().to_str().unwrap(), "state.json");
}

#[test]
fn replay_accepts_format_flag() {
let cli = Cli::parse_from([
"soroban-debug",
"replay",
"trace.json",
"--format",
"json",
]);

let Commands::Replay(args) = cli.command.expect("replay command expected") else {
panic!("replay command expected");
};

assert_eq!(args.format, OutputFormat::Json);
assert_eq!(args.trace_file.to_str().unwrap(), "trace.json");
}
}

#[derive(Parser)]
Expand Down Expand Up @@ -1262,6 +1280,10 @@ pub struct ReplayArgs {
/// Show verbose output during replay
#[arg(short, long)]
pub verbose: bool,

/// Output format for the diff report (pretty or json)
#[arg(long, value_enum, default_value_t = OutputFormat::Pretty)]
pub format: OutputFormat,
}

#[derive(Parser)]
Expand Down
Loading