Skip to content

Commit

Permalink
test: add another escaping test
Browse files Browse the repository at this point in the history
  • Loading branch information
hoodie committed Sep 8, 2024
1 parent 68fe9db commit 4638cf9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ impl Parameter {
}
}

impl From<(&str, &str)> for Parameter {
fn from((key, val): (&str, &str)) -> Self {
Parameter::new(key, val)
}
}

//type EntryParameters = Vec<Parameter>;
pub type EntryParameters = HashMap<String, Parameter>;

Expand Down Expand Up @@ -453,7 +459,7 @@ mod tests {
let expected = r"\N\\\;\,:";

let prop = Property::new("DESCRIPTION", line)
.append_parameter(Parameter::new("VALUE", "TEXT"))
.append_parameter(("VALUE", "TEXT"))
.done();
let expected = format!("DESCRIPTION;VALUE=TEXT:{expected}\r\n");

Expand Down

0 comments on commit 4638cf9

Please sign in to comment.