mirror of
https://github.com/lune-org/lune.git
synced 2024-12-13 21:40:40 +00:00
21 lines
705 B
Lua
21 lines
705 B
Lua
local fs = require("@lune/fs")
|
|
local roblox = require("@lune/roblox") :: any
|
|
|
|
local placeDirs = {}
|
|
for _, dirName in fs.readDir("tests/roblox/rbx-test-files/places") do
|
|
table.insert(placeDirs, "tests/roblox/rbx-test-files/places/" .. dirName)
|
|
end
|
|
|
|
for _, placeDir in placeDirs do
|
|
local placeFileBinary = fs.readFile(placeDir .. "/binary.rbxl")
|
|
local placeFileXml = fs.readFile(placeDir .. "/xml.rbxlx")
|
|
|
|
local placeBinary = roblox.deserializePlace(placeFileBinary)
|
|
local placeXml = roblox.deserializePlace(placeFileXml)
|
|
|
|
assert(placeBinary.ClassName == "DataModel")
|
|
assert(placeXml.ClassName == "DataModel")
|
|
|
|
assert(placeBinary:IsA("ServiceProvider"))
|
|
assert(placeXml:IsA("ServiceProvider"))
|
|
end
|