File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ abstract class NodeSeq extends AbstractSeq[Node] with immutable.Seq[Node] with S
116116 that match {
117117 case " " => fail
118118 case " _" => makeSeq(! _.isAtom)
119+ case " @" => fail
119120 case _ if (that(0 ) == '@' && this .length == 1 ) => atResult
120121 case _ => makeSeq(_.label == that)
121122 }
Original file line number Diff line number Diff line change @@ -154,4 +154,23 @@ class AttributeTest {
154154 assertEquals(List (Group (Seq (Text (" 1" ))), Group (Seq (Text (" 2" )))), barList)
155155 }
156156
157+ @ Test (expected= classOf [IllegalArgumentException ])
158+ def invalidAttributeFailForOne : Unit = {
159+ <x /> \ " @"
160+ }
161+
162+ @ Test (expected= classOf [IllegalArgumentException ])
163+ def invalidAttributeFailForMany : Unit = {
164+ <x ><y /><z /></x >.child \ " @"
165+ }
166+
167+ @ Test (expected= classOf [IllegalArgumentException ])
168+ def invalidEmptyAttributeFailForOne : Unit = {
169+ <x /> \@ " "
170+ }
171+
172+ @ Test (expected= classOf [IllegalArgumentException ])
173+ def invalidEmptyAttributeFailForMany : Unit = {
174+ <x ><y /><z /></x >.child \@ " "
175+ }
157176}
You can’t perform that action at this time.
0 commit comments