Skip to content

Commit 46c387b

Browse files
committed
make test platform agnostic
1 parent c7af90d commit 46c387b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/bootstrap/src/core/config/tests.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,9 @@ fn test_explicit_stage() {
518518

519519
#[test]
520520
fn test_exclude() {
521-
let config = parse("build.exclude=[\"test/codegen\"]");
521+
use std::path::MAIN_SEPARATOR;
522+
let exclude_path = format!("test{}codegen", MAIN_SEPARATOR);
523+
let config = parse(&format!("build.exclude=[\"{}\"]", exclude_path));
522524

523525
let first_excluded = config
524526
.skip
@@ -527,5 +529,5 @@ fn test_exclude() {
527529
.to_str()
528530
.expect("Failed to convert excluded path to string");
529531

530-
assert_eq!(first_excluded, "test/codegen");
532+
assert_eq!(first_excluded, exclude_path);
531533
}

0 commit comments

Comments
 (0)