2023-05-20 14:23:51 +02:00
|
|
|
local fs = require("@lune/fs")
|
2023-05-20 19:49:37 +02:00
|
|
|
local roblox = require("@lune/roblox")
|
2023-03-25 17:07:08 +01:00
|
|
|
|
2023-05-20 14:23:51 +02:00
|
|
|
local modelFile = fs.readFile("tests/roblox/rbx-test-files/models/three-nested-folders/binary.rbxm")
|
|
|
|
local model = roblox.deserializeModel(modelFile)[1]
|
2023-03-25 17:07:08 +01:00
|
|
|
|
|
|
|
local child = model:FindFirstChild("Parent")
|
2023-05-20 19:49:37 +02:00
|
|
|
assert(child ~= nil)
|
2023-03-25 17:07:08 +01:00
|
|
|
local descendant = child:FindFirstChild("Child")
|
2023-05-20 19:49:37 +02:00
|
|
|
assert(descendant ~= nil)
|
2023-03-25 17:07:08 +01:00
|
|
|
|
|
|
|
assert(descendant:GetFullName() == "Grandparent.Parent.Child")
|
|
|
|
assert(child:GetFullName() == "Grandparent.Parent")
|
|
|
|
assert(model:GetFullName() == "Grandparent")
|