Skip to content

Commit 053e387

Browse files
committed
test: Add module to fixture test name in output
1 parent d5c7c9f commit 053e387

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/fixtures/main.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,15 @@ fn main() {
1414
}
1515

1616
fn setup(input_path: std::path::PathBuf) -> tryfn::Case {
17-
let name = input_path.file_stem().unwrap().to_str().unwrap().to_owned();
17+
let parent = input_path
18+
.parent()
19+
.unwrap()
20+
.file_name()
21+
.unwrap()
22+
.to_str()
23+
.unwrap();
24+
let file_name = input_path.file_stem().unwrap().to_str().unwrap();
25+
let name = format!("{}::{}", parent, file_name);
1826
let expected = Data::read_from(&input_path.with_extension("svg"), None);
1927
tryfn::Case {
2028
name,

0 commit comments

Comments
 (0)