Skip to content

Commit

Permalink
fix: Drops check for .json when testing a single file (bluealloy#1301)
Browse files Browse the repository at this point in the history
  • Loading branch information
mw2000 authored Apr 13, 2024
1 parent 7957c02 commit 5d25c4d
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions bins/revme/src/cmd/statetest/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,16 @@ pub enum TestErrorKind {
}

pub fn find_all_json_tests(path: &Path) -> Vec<PathBuf> {
WalkDir::new(path)
.into_iter()
.filter_map(Result::ok)
.filter(|e| e.path().extension() == Some("json".as_ref()))
.map(DirEntry::into_path)
.collect()
if path.is_file() {
vec![path.to_path_buf()]
} else {
WalkDir::new(path)
.into_iter()
.filter_map(Result::ok)
.filter(|e| e.path().extension() == Some("json".as_ref()))
.map(DirEntry::into_path)
.collect()
}
}

fn skip_test(path: &Path) -> bool {
Expand Down

0 comments on commit 5d25c4d

Please sign in to comment.