File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
shared/src/test/scala/scala/xml Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ package scala .xml
2+
3+ import org .junit .Test
4+ import org .junit .Assert .assertEquals
5+
6+ class PCDataTest {
7+
8+ @ Test
9+ def emptyTest = {
10+ val pcdata = new PCData (" " )
11+ assertEquals(" <![CDATA[]]>" , pcdata.toString)
12+ }
13+
14+ @ Test
15+ def bracketTest = {
16+ val pcdata = new PCData (" []" )
17+ assertEquals(" <![CDATA[[]]]>" , pcdata.toString)
18+ }
19+
20+ @ Test
21+ def hellaBracketingTest = {
22+ val pcdata = new PCData (" [[[[[[[[]]]]]]]]" )
23+ assertEquals(" <![CDATA[[[[[[[[[]]]]]]]]]]>" , pcdata.toString)
24+ }
25+
26+ @ Test
27+ def simpleNestingTest = {
28+ val pcdata = new PCData (" ]]>" )
29+ assertEquals(" <![CDATA[]]]]><![CDATA[>]]>" , pcdata.toString)
30+ }
31+
32+ @ Test
33+ def recursiveNestingTest = {
34+ val pcdata = new PCData (" <![CDATA[]]>" )
35+ assertEquals(" <![CDATA[<![CDATA[]]]]><![CDATA[>]]>" , pcdata.toString)
36+ }
37+ }
You can’t perform that action at this time.
0 commit comments