diff options
| author | Kevin Ballard | 2018-05-16 14:30:28 -0700 |
|---|---|---|
| committer | Ed Barnard | 2018-05-16 23:07:03 +0100 |
| commit | 780dfc6eaff7351402d9094ef3e432ffaba2b0ce (patch) | |
| tree | f4c119068fc01527a2761d69f5c99da29563f908 /src/xml | |
| parent | 45ab6d492c1a031485962e17d2af932d8af069d8 (diff) | |
| download | rust-plist-780dfc6eaff7351402d9094ef3e432ffaba2b0ce.tar.bz2 | |
Add a test to ensure string data is entity-escaped
Diffstat (limited to 'src/xml')
| -rw-r--r-- | src/xml/writer.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/xml/writer.rs b/src/xml/writer.rs index 4facfd2..e002e55 100644 --- a/src/xml/writer.rs +++ b/src/xml/writer.rs @@ -213,6 +213,8 @@ mod tests { DataValue(vec![0, 0, 0, 190, 0, 0, 0, 3, 0, 0, 0, 30, 0, 0, 0]), StringValue("Birthdate".to_owned()), DateValue(parse_rfc3339_weak("1981-05-16 11:32:06").unwrap().into()), + StringValue("Comment".to_owned()), + StringValue("2 < 3".to_owned()), // make sure characters are escaped EndDictionary, ]; @@ -245,6 +247,8 @@ mod tests { \t<data>AAAAvgAAAAMAAAAeAAAA</data> \t<key>Birthdate</key> \t<date>1981-05-16T11:32:06Z</date> +\t<key>Comment</key> +\t<string>2 < 3</string> </dict> </plist>"; |
