mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 21:10:36 +00:00
21 lines
698 B
Lua
21 lines
698 B
Lua
local fs = require("@lune/fs")
|
|
local roblox = require("@lune/roblox")
|
|
|
|
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
|