Revert "[test] add tests for --force flag and numeric suffix handling to ensure proper output file resolution and overwriting behavior"

This reverts commit 6994d20f5e.
This commit is contained in:
2025-08-12 06:00:08 +02:00
parent fdf5e3370d
commit b9308be930
2 changed files with 6 additions and 70 deletions

View File

@@ -129,10 +129,6 @@ struct Args {
/// Continue processing other inputs even if some fail; exit non-zero if any failed
#[arg(long = "continue-on-error")]
continue_on_error: bool,
/// Overwrite existing output files instead of appending a numeric suffix
#[arg(long = "force")]
force: bool,
}
#[derive(Debug, Deserialize)]
@@ -515,13 +511,13 @@ fn run() -> Result<()> {
// In merge+separate mode, always write merged output inside the provided directory
let base = outp.join(format!("{}_merged", polyscribe::date_prefix()));
let root = OutputRoot { items: merged_items.clone() };
write_outputs(&base, &root, &out_formats, args.force)?;
write_outputs(&base, &root, &out_formats)?;
} else {
// For single merged file, ensure the parent dir exists
if let Some(parent) = outp.parent() { create_dir_all(parent).ok(); }
let base = outp.with_file_name(format!("{}_{}", polyscribe::date_prefix(), outp.file_name().and_then(|s| s.to_str()).unwrap_or("out")));
let root = OutputRoot { items: merged_items.clone() };
write_outputs(&base, &root, &out_formats, args.force)?;
write_outputs(&base, &root, &out_formats)?;
}
} else {
// Print JSON to stdout
@@ -551,7 +547,7 @@ fn run() -> Result<()> {
let root = OutputRoot { items };
let stem = path.file_stem().and_then(|s| s.to_str()).unwrap_or("output");
let base = out_dir.join(format!("{}_{}", polyscribe::date_prefix(), stem));
write_outputs(&base, &root, &out_formats, args.force)?;
write_outputs(&base, &root, &out_formats)?;
} else if is_audio_file(path) {
// Skip in tests
}