blob: 17283455740b2042e7c2c90348cdc89bb4a8c661 (
plain)
1
2
3
4
5
6
7
8
9
|
local fs = require 'bee.filesystem'
local platform = require 'bee.platform'
local path = fs.path '/a/b/c/d/e/../../../..'
local absolute = fs.absolute(path)
if platform.OS == 'Windows' then
assert(absolute:string():sub(-2) == '/a')
else
assert(absolute:string():sub(-3) == '/a/')
end
|