This repository has been archived by the owner on Jul 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GetFullName() method on instances (#49)
* implement instance:GetFullName() * add entry to changelog * use as_str
- Loading branch information
1 parent
92390de
commit 0ad5aaa
Showing
3 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
local function assertString(result, expected) | ||
assert(result == expected, ('expected `%s` but got `%s`'):format(expected, result)) | ||
end | ||
|
||
local FOLDER_A_NAME = "foo" | ||
local FOLDER_B_NAME = "bar" | ||
|
||
local folderA = Instance.new("Folder") | ||
folderA.Name = FOLDER_A_NAME | ||
|
||
assertString(folderA:GetFullName(), FOLDER_A_NAME) | ||
|
||
local folderB = Instance.new("Folder") | ||
folderB.Name = FOLDER_B_NAME | ||
folderB.Parent = folderA | ||
|
||
assertString(folderB:GetFullName(), FOLDER_A_NAME .. '.' .. FOLDER_B_NAME) | ||
|
||
local game = remodel.readPlaceFile("test-models/place-with-models.rbxlx") | ||
|
||
assertString(game.Workspace.Baseplate:GetFullName(), "Workspace.Baseplate") |