Skip to content

Commit

Permalink
fix errors and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
webbdays committed Apr 21, 2024
1 parent 05ed2d2 commit 7800d33
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 18 deletions.
40 changes: 27 additions & 13 deletions Cargo.lock

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

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ rust-version = "1.65"

[dependencies]
camino = "1.1.6"
fancy-regex = "0.13.0"
libtest-mimic = "0.7.2"
regex = "1.10.4"
walkdir = "2.5.0"
fancy_regex = "0.13.0"

[[test]]
name = "example"
Expand Down
2 changes: 1 addition & 1 deletion src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl Requirements {
let tests: Vec<_> = utils::iterate_directory(&self.root)
.filter_map(|path_res| {
let path = path_res.expect("error while iterating directory");
if re.is_match(path.as_str()) {
if re.is_match(path.as_str()).unwrap_or_else(|_| panic!("Problem with matching following pattern : '{}'", self.pattern)) {
let testfn = self.test;
let name = utils::derive_test_name(&self.root, &path, &self.test_name);
Some(Trial::test(name, move || {
Expand Down
4 changes: 2 additions & 2 deletions tests/example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ fn test_artifact_utf8(path: &Utf8Path) -> Result<()> {
datatest_stable::harness!(
test_artifact,
"tests/files",
r"^.*/*",
r"^.*(?<!\.skip)\.txt",
test_artifact_utf8,
"tests/files",
r"^.*/*",
r"^.*(?<!\.skip)\.txt",
);
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions tests/files/c.skip.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
baz foo

0 comments on commit 7800d33

Please sign in to comment.