From 6f1f106b79a03459110b05e48ae3fd6ef6c07c7c Mon Sep 17 00:00:00 2001 From: Alex Rudy Date: Tue, 14 May 2024 05:32:58 +0000 Subject: [PATCH 1/2] Improvements to path tests --- src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 3dd1f1f..2f0e6de 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -579,6 +579,9 @@ mod test { let path = "/foo/bar".parse::().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")); From 0eb0ee987ccdf7039f8d76b540a9f284fea7a43d Mon Sep 17 00:00:00 2001 From: Alex Rudy Date: Tue, 21 May 2024 04:39:52 +0000 Subject: [PATCH 2/2] Fix readme attributes which include readme in docs and apply doctests. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 2f0e6de..7321823 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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")] }