Skip to content

Commit 22977ca

Browse files
committed
Add more tests about fallback
1 parent fef6217 commit 22977ca

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/bounds.rs

+18
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,24 @@ mod tests {
743743
)),
744744
);
745745

746+
assert_eq!(
747+
UserBounds::from_str("1=allow:colon:in:fallback").ok(),
748+
Some(UserBounds::with_fallback(
749+
Side::Some(1),
750+
Side::Some(1),
751+
Some("allow:colon:in:fallback".as_bytes().to_owned())
752+
)),
753+
);
754+
755+
assert_eq!(
756+
UserBounds::from_str("1:2=allow:colon:in:fallback").ok(),
757+
Some(UserBounds::with_fallback(
758+
Side::Some(1),
759+
Side::Some(2),
760+
Some("allow:colon:in:fallback".as_bytes().to_owned())
761+
)),
762+
);
763+
746764
{
747765
#![allow(clippy::bind_instead_of_map)]
748766
assert_eq!(

0 commit comments

Comments
 (0)