summaryrefslogtreecommitdiff
path: root/cask/test/src/test/cask/UtilTests.scala
blob: 7b34434415250ff773106290e23b55eaf6f57ff2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package test.cask

import utest._

object UtilTests extends TestSuite {
  val tests = Tests{
    'splitPath - {
      cask.internal.Util.splitPath("") ==> Seq()
      cask.internal.Util.splitPath("/") ==> Seq()
      cask.internal.Util.splitPath("////") ==> Seq()

      cask.internal.Util.splitPath("abc") ==> Seq("abc")
      cask.internal.Util.splitPath("/abc/") ==> Seq("abc")
      cask.internal.Util.splitPath("//abc") ==> Seq("abc")
      cask.internal.Util.splitPath("abc//") ==> Seq("abc")

      cask.internal.Util.splitPath("abc//def") ==> Seq("abc", "def")
      cask.internal.Util.splitPath("//abc//def//") ==> Seq("abc", "def")
    }
  }
}