Skip to content

Commit

Permalink
test: escaping chars in text
Browse files Browse the repository at this point in the history
  • Loading branch information
good-praxis committed Sep 8, 2024
1 parent 70d442a commit 22ed46f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,14 @@ mod tests {
assert_eq!(expected, fold_line(line));
}

#[test]
fn escape_special_characters_in_text() {
let line = r"\n\;,:";

let expected = r"\\n\\\;\,:";
assert_eq!(expected, Property::escape_text(line));
}

#[cfg(feature = "parser")]
#[test]
fn preserve_spaces() {
Expand Down

0 comments on commit 22ed46f

Please sign in to comment.