From 780dfc6eaff7351402d9094ef3e432ffaba2b0ce Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Wed, 16 May 2018 14:30:28 -0700 Subject: Add a test to ensure string data is entity-escaped --- src/xml/writer.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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 { \tAAAAvgAAAAMAAAAeAAAA \tBirthdate \t1981-05-16T11:32:06Z +\tComment +\t2 < 3 "; -- cgit v1.2.3