tests: Allow quotes in keys
This commit is contained in:
parent
db38713977
commit
e3daf7c853
1 changed files with 6 additions and 3 deletions
|
@ -75,7 +75,8 @@ mod test {
|
|||
|
||||
#[test]
|
||||
fn test_single_quoted() {
|
||||
assert!(String::from("foo='bar'").into_kv().is_none());
|
||||
let s = String::from("foo='bar'").into_kv().unwrap();
|
||||
assert_eq!(KeyValue::new(String::from("foo"), String::from("\'bar\'")), s);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -86,12 +87,14 @@ mod test {
|
|||
|
||||
#[test]
|
||||
fn test_double_and_single_quoted() {
|
||||
assert!(String::from("foo=\"bar\'").into_kv().is_none());
|
||||
let s = String::from("foo=\"bar\'").into_kv().unwrap();
|
||||
assert_eq!(KeyValue::new(String::from("foo"), String::from("\"bar\'")), s);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_single_and_double_quoted() {
|
||||
assert!(String::from("foo=\'bar\"").into_kv().is_none());
|
||||
let s = String::from("foo=\'bar\"").into_kv().unwrap();
|
||||
assert_eq!(KeyValue::new(String::from("foo"), String::from("\'bar\"")), s);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Reference in a new issue