This commit is contained in:
Conrad Irwin 2023-11-13 13:52:49 -07:00
parent f464d69ff8
commit f8bc9be284

View file

@ -312,15 +312,15 @@ mod tests {
#[test] #[test]
fn test_parse_context() { fn test_parse_context() {
let mut expected = KeyContext::default(); let mut expected = KeyContext::default();
expected.set("foo", "bar");
expected.add("baz"); expected.add("baz");
expected.set("foo", "bar");
assert_eq!(KeyContext::parse("baz foo=bar").unwrap(), expected); assert_eq!(KeyContext::parse("baz foo=bar").unwrap(), expected);
assert_eq!(KeyContext::parse("foo = bar baz").unwrap(), expected); assert_eq!(KeyContext::parse("baz foo = bar").unwrap(), expected);
assert_eq!( assert_eq!(
KeyContext::parse(" baz foo = bar baz").unwrap(), KeyContext::parse(" baz foo = bar baz").unwrap(),
expected expected
); );
assert_eq!(KeyContext::parse(" foo = bar baz").unwrap(), expected); assert_eq!(KeyContext::parse(" baz foo = bar").unwrap(), expected);
} }
#[test] #[test]