2023-05-14 21:16:58 +01:00
|
|
|
local fs = require("@lune/fs")
|
2023-05-20 18:49:37 +01:00
|
|
|
local roblox = require("@lune/roblox")
|
2023-03-22 12:02:05 +00:00
|
|
|
|
|
|
|
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
|
2023-05-20 13:23:51 +01:00
|
|
|
local placeFileBinary = fs.readFile(placeDir .. "/binary.rbxl")
|
|
|
|
local placeFileXml = fs.readFile(placeDir .. "/xml.rbxlx")
|
|
|
|
|
|
|
|
local placeBinary = roblox.deserializePlace(placeFileBinary)
|
|
|
|
local placeXml = roblox.deserializePlace(placeFileXml)
|
2023-03-22 12:02:05 +00:00
|
|
|
|
|
|
|
assert(placeBinary.ClassName == "DataModel")
|
|
|
|
assert(placeXml.ClassName == "DataModel")
|
|
|
|
|
|
|
|
assert(placeBinary:IsA("ServiceProvider"))
|
|
|
|
assert(placeXml:IsA("ServiceProvider"))
|
|
|
|
end
|