mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 13:00:37 +00:00
24 lines
671 B
Lua
24 lines
671 B
Lua
local roblox = require("@lune/roblox") :: any
|
|
local Instance = roblox.Instance
|
|
|
|
local game = Instance.new("DataModel")
|
|
|
|
local workspace = game:GetService("Workspace")
|
|
|
|
local model = Instance.new("Model")
|
|
local part = Instance.new("Part")
|
|
|
|
part.Parent = model
|
|
model.Parent = workspace
|
|
|
|
roblox.writePlaceFile("bin/temp-place.rbxl", game)
|
|
roblox.writePlaceFile("bin/temp-place.rbxlx", game)
|
|
|
|
local savedBinary = roblox.readPlaceFile("bin/temp-place.rbxl")
|
|
local savedXml = roblox.readPlaceFile("bin/temp-place.rbxlx")
|
|
|
|
assert(savedBinary.Name ~= "ROOT")
|
|
assert(savedXml.Name ~= "ROOT")
|
|
|
|
assert(savedBinary.ClassName == "DataModel")
|
|
assert(savedXml.ClassName == "DataModel")
|