Skip to content

Commit 9ba8f6d

Browse files
committed
fix(cli): test parsing on windows
1 parent 2852579 commit 9ba8f6d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cli/src/test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,11 +525,11 @@ fn parse_test_content(name: String, content: &str, file_path: Option<PathBuf>) -
525525
let mut test_name = String::new();
526526
let mut seen_marker = false;
527527

528-
for line in test_name_and_markers
529-
.split(|&c| c == b'\n')
528+
for line in str::from_utf8(test_name_and_markers)
529+
.unwrap()
530+
.lines()
530531
.filter(|s| !s.is_empty())
531532
{
532-
let line = str::from_utf8(line).unwrap();
533533
match line.split('(').next().unwrap() {
534534
":skip" => (seen_marker, skip) = (true, true),
535535
":platform" => {

0 commit comments

Comments
 (0)