File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
shared/src/test/scala/scala/xml Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -56,4 +56,28 @@ class UtilityTest {
5656 assertEquals(" <node><leaf/></node>" , Utility .serialize(x, minimizeTags = MinimizeMode .Always ).toString)
5757 }
5858
59+ @ Test
60+ def issue73StartsWithAndEndsWithWSInFirst : Unit = {
61+ val x = <div >{Text (" My name is " )}{Text (" Harry" )}</div >
62+ assertEquals(<div >My name is Harry </div >, Utility .trim(x))
63+ }
64+
65+ @ Test
66+ def issue73EndsWithWSInLast : Unit = {
67+ val x = <div >{Text (" My name is " )}{Text (" Harry " )}</div >
68+ assertEquals(<div >My name is Harry </div >, Utility .trim(x))
69+ }
70+
71+ @ Test
72+ def issue73HasWSInMiddle : Unit = {
73+ val x = <div >{Text (" My name is" )}{Text (" " )}{Text (" Harry" )}</div >
74+ assertEquals(<div >My name is Harry </div >, Utility .trim(x))
75+ }
76+
77+ @ Test
78+ def issue73HasWSEverywhere : Unit = {
79+ val x = <div >{Text (" My name " )}{Text (" is " )}{Text (" Harry " )}</div >
80+ assertEquals(<div >My name is Harry </div >, Utility .trim(x))
81+ }
82+
5983}
You can’t perform that action at this time.
0 commit comments