fun <T : Path> Expect<T>.toBeRelative(): Expect<T>
(source)
Expects that the subject of this
expectation (a Path) is a relative path;
meaning that the Path specified in this instance does not start at the file system root.
expect(Paths.get("relative/path")).toBeRelative()
fails {
val s = FileSystems.getDefault().separator
val prefix = if (s == "\\") "C:" else "" // if (s == "\\") => true current os is windows
expect(Paths.get("$prefix${s}absolute${s}path")).toBeRelative()
}
Return
an Expect for the subject of this
expectation.
Since
0.17.0