Skip to content

Commit

Permalink
Fix things that aren't run by cargo test.
Browse files Browse the repository at this point in the history
  • Loading branch information
ltratt committed Jan 22, 2024
1 parent 8989dc5 commit 4f8de3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/fm_options/run_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use regex::Regex;
fn main() {
LangTester::new()
.test_dir("examples/fm_options/lang_tests")
.test_path_filter(|p| p.extension().unwrap().to_str().unwrap() == "py")
.test_path_filter(|p| p.extension().and_then(|x| x.to_str()) == Some("py"))
.test_extract(|p| {
read_to_string(p)
.unwrap()
Expand Down
2 changes: 1 addition & 1 deletion examples/rust_lang_tester/run_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fn main() {
LangTester::new()
.test_dir("examples/rust_lang_tester/lang_tests")
// Only use files named `*.rs` as test files.
.test_path_filter(|p| p.extension().unwrap().to_str().unwrap() == "rs")
.test_path_filter(|p| p.extension().and_then(|x| x.to_str()) == Some("rs"))
// Extract the first sequence of commented line(s) as the tests.
.test_extract(|p| {
read_to_string(p)
Expand Down

0 comments on commit 4f8de3d

Please sign in to comment.