Skip to content

Commit

Permalink
Add a test for invalid base_dir value
Browse files Browse the repository at this point in the history
  • Loading branch information
hansl authored and la10736 committed Sep 26, 2024
1 parent 3520861 commit 8c232bc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rstest_macros/src/parse/rstest/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,10 @@ mod should {
r#"fn f(#[files("some")] #[base_dir = "/"] #[base_dir = "/"] a: PathBuf) {}"#,
"more than once"
)]
#[case::invalid_base_dir(
r#"fn f(#[files("some")] #[base_dir = 123] a: PathBuf) {}"#,
"base directory for the glob path"
)]
fn raise_error(#[case] item_fn: &str, #[case] message: &str) {
let mut item_fn: ItemFn = item_fn.ast();

Expand Down

0 comments on commit 8c232bc

Please sign in to comment.