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 modelDirs = {}
|
|
|
|
for _, dirName in fs.readDir("tests/roblox/rbx-test-files/places") do
|
|
|
|
table.insert(modelDirs, "tests/roblox/rbx-test-files/places/" .. dirName)
|
|
|
|
end
|
|
|
|
|
|
|
|
for _, modelDir in modelDirs do
|
2023-05-20 13:23:51 +01:00
|
|
|
local modelFileBinary = fs.readFile(modelDir .. "/binary.rbxl")
|
|
|
|
local modelFileXml = fs.readFile(modelDir .. "/xml.rbxlx")
|
|
|
|
|
|
|
|
local modelBinary = roblox.deserializeModel(modelFileBinary)
|
|
|
|
local modelXml = roblox.deserializeModel(modelFileXml)
|
2023-03-22 12:02:05 +00:00
|
|
|
|
|
|
|
for _, modelInstance in modelBinary do
|
|
|
|
assert(modelInstance:IsA("Instance"))
|
|
|
|
end
|
|
|
|
|
|
|
|
for _, modelInstance in modelXml do
|
|
|
|
assert(modelInstance:IsA("Instance"))
|
|
|
|
end
|
|
|
|
end
|