Merge pull request #574 from sschuberth/fix-pipe-symbol-in-tree

Tree: Fix the pipe symbol to match the other UTF-8 symbols used
This commit is contained in:
Alexandre Archambault 2017-06-13 14:13:06 +02:00 committed by GitHub
commit f4e98c6bc5
2 changed files with 6 additions and 6 deletions

View File

@ -36,7 +36,7 @@ object Tree {
def showLine(isLast: Seq[Boolean]): String = { def showLine(isLast: Seq[Boolean]): String = {
val initPrefix = init(isLast) { val initPrefix = init(isLast) {
case true => " " case true => " "
case false => "| " case false => " "
}.mkString }.mkString
val lastPrefix = last(isLast) { val lastPrefix = last(isLast) {

View File

@ -18,11 +18,11 @@ object TreeTests extends TestSuite {
'apply { 'apply {
val str = Tree[Node](roots)(_.children, _.label) val str = Tree[Node](roots)(_.children, _.label)
assert(str == """├─ p1 assert(str == """├─ p1
|| ├─ c1 # ├─ c1
|| └─ c2 # └─ c2
|└─ p2 #└─ p2
| ├─ c3 # ├─ c3
| └─ c4""".stripMargin) # └─ c4""".stripMargin('#'))
} }
} }
} }