Skip to content

Commit

Permalink
Merge pull request #4 from alexrudy/chore/path-tests
Browse files Browse the repository at this point in the history
Improvements to path tests
  • Loading branch information
alexrudy authored May 21, 2024
2 parents 57c1fb0 + 0eb0ee9 commit d49ca34
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ use crate::error::DirectivePathParseError;
use crate::error::RobotParseError;
use crate::error::UserAgentParseError;

#[doc(hidden)]
mod readme {
#![doc(hidden)]
#![doc = include_str!("../README.md")]
}

Expand Down Expand Up @@ -579,6 +579,9 @@ mod test {
let path = "/foo/bar".parse::<DirectivePath>().unwrap();
assert!(path.matches("/foo/bar/baz"));
assert!(!path.matches("/foo"));
assert!(!path.matches("/foo/b"));
assert!(!path.matches("/foo/barley"));
assert!(path.matches("/foo/bar/"));

let path = DirectivePath::ANY;
assert!(path.matches("/foo/bar/baz"));
Expand Down

0 comments on commit d49ca34

Please sign in to comment.