Skip to content

Commit

Permalink
Unit test for #28 PrettyPrinter adds empty attribute with xmlns
Browse files Browse the repository at this point in the history
	* src/test/scala/scala/xml/XMLTest.scala (issue28): New unit test
  • Loading branch information
ashawley committed Sep 12, 2014
1 parent 57b6e25 commit 232439e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/test/scala/scala/xml/XMLTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -824,4 +824,14 @@ expected closing tag of foo
}
}

@UnitTest
def issue28: Unit = {
val x = <x:foo xmlns:x="gaga"/>
// val ns = new NamespaceBinding("x", "gaga", sc)
// val x = Elem("x", "foo", e, ns)
val pp = new xml.PrettyPrinter(80, 2)
assertEquals("""<x:foo xmlns:x="gaga"/>""", x.toString)
assertEquals("""<x:foo xmlns:x="gaga"/>""", pp.format(x))
}

}

0 comments on commit 232439e

Please sign in to comment.