diff options
author | Tor Norbye <tnorbye@google.com> | 2014-08-19 22:27:03 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-08-19 21:25:05 +0000 |
commit | 4ca751c002784c4bfd349cc5240b045b62277c80 (patch) | |
tree | dfc17b31990e2429535609b85f6d080c4fa0d9fe /platform/util/testSrc/com/intellij/util/xmlb/XmlSerializerTest.java | |
parent | 890d9a2952301682ffecaed4495f5f65c84c3642 (diff) | |
parent | 060e58b3afea3ea39f5ba1cb5a443ca3ebda28c8 (diff) | |
download | idea-4ca751c002784c4bfd349cc5240b045b62277c80.tar.gz |
Merge "Merge remote-tracking branch 'aosp/upstream-master' into merge"
Diffstat (limited to 'platform/util/testSrc/com/intellij/util/xmlb/XmlSerializerTest.java')
-rw-r--r-- | platform/util/testSrc/com/intellij/util/xmlb/XmlSerializerTest.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/platform/util/testSrc/com/intellij/util/xmlb/XmlSerializerTest.java b/platform/util/testSrc/com/intellij/util/xmlb/XmlSerializerTest.java index 377abeba5b18..9a3fcb9d7066 100644 --- a/platform/util/testSrc/com/intellij/util/xmlb/XmlSerializerTest.java +++ b/platform/util/testSrc/com/intellij/util/xmlb/XmlSerializerTest.java @@ -495,6 +495,22 @@ public class XmlSerializerTest extends TestCase { "</BeanWithFieldWithTagAnnotation>", bean); } + public void testEscapeCharsInTagText() { + BeanWithFieldWithTagAnnotation bean = new BeanWithFieldWithTagAnnotation(); + bean.STRING_V = "a\nb\"<"; + + doSerializerTest( + "<BeanWithFieldWithTagAnnotation>\n" + + " <name>a\nb"<</name>\n" + + "</BeanWithFieldWithTagAnnotation>", bean); + } + + public void testEscapeCharsInAttributeValue() { + final BeanWithPropertiesBoundToAttribute bean = new BeanWithPropertiesBoundToAttribute(); + bean.name = "a\nb\"<"; + doSerializerTest("<BeanWithPropertiesBoundToAttribute count=\"3\" name=\"a b"<\" />", bean); + } + public void testShuffledDeserialize() { BeanWithPublicFields bean = new BeanWithPublicFields(); bean.INT_V = 987; |