Skip to content

Commit

Permalink
chore(tasks/coverage): fix test262 cases to run on windows (#8358)
Browse files Browse the repository at this point in the history
`skip_test_path` was not working on windows because the path included
`\\`.
  • Loading branch information
sapphi-red authored Jan 9, 2025
1 parent b6c1546 commit 3ba0b53
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions tasks/coverage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ oxc_tasks_common = { workspace = true }
oxc_tasks_transform_checker = { workspace = true }

console = { workspace = true }
cow-utils = { workspace = true }
encoding_rs = { workspace = true }
encoding_rs_io = { workspace = true }
futures = { workspace = true }
Expand Down
2 changes: 2 additions & 0 deletions tasks/coverage/src/test262/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ mod meta;

use std::path::{Path, PathBuf};

use cow_utils::CowUtils;
use oxc::span::SourceType;

pub use self::meta::{MetaData, Phase, TestFlag};
Expand All @@ -27,6 +28,7 @@ impl<T: Case> Suite<T> for Test262Suite<T> {

fn skip_test_path(&self, path: &Path) -> bool {
let path = path.to_string_lossy();
let path = path.cow_replace('\\', "/");
path.contains("test262/test/staging") ||
// ignore markdown files
path.ends_with(".md") ||
Expand Down

0 comments on commit 3ba0b53

Please sign in to comment.