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
8 changes: 4 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ fn main() -> Result<()> {

results_out.push_str(&deterministic_cargo_stderr);

// if there is no test file at the standard location (tests/<slug>.rs),
// pretend like the test file is empty
let test_file =
std::fs::read_to_string(format!("tests/{}.rs", cli_args.slug)).unwrap_or_default();
let snake_slug = cli_args.slug.replace('-', "_");
// if there is no test file at the standard location
// (tests/<snake_slug>.rs), pretend that the test file is empty
let test_file = std::fs::read_to_string(format!("tests/{snake_slug}.rs")).unwrap_or_default();
let name_to_code = parse_test_code::parse_file(&test_file);

let out = convert(
Expand Down
Loading