mirror of
https://github.com/bazelbuild/bazel-skylib
synced 2024-11-27 05:43:25 +00:00
Add absolute path tests for Windows (#230)
This commit is contained in:
parent
1c5ed0706a
commit
2d4c9528e0
|
@ -78,12 +78,18 @@ def _is_absolute_test(ctx):
|
|||
asserts.false(env, paths.is_absolute("foo/"))
|
||||
asserts.false(env, paths.is_absolute("foo/bar"))
|
||||
|
||||
# Try some absolute paths.
|
||||
# Try some Linux absolute paths.
|
||||
asserts.true(env, paths.is_absolute("/"))
|
||||
asserts.true(env, paths.is_absolute("/foo"))
|
||||
asserts.true(env, paths.is_absolute("/foo/"))
|
||||
asserts.true(env, paths.is_absolute("/foo/bar"))
|
||||
|
||||
# Try some Windows absolute paths.
|
||||
asserts.true(env, paths.is_absolute("D:\\"))
|
||||
asserts.true(env, paths.is_absolute("C:\\"))
|
||||
asserts.true(env, paths.is_absolute("C:\\foo"))
|
||||
asserts.true(env, paths.is_absolute("C:\\foo\\bar"))
|
||||
|
||||
return unittest.end(env)
|
||||
|
||||
is_absolute_test = unittest.make(_is_absolute_test)
|
||||
|
|
Loading…
Reference in a new issue