forked from rojo-rbx/rojo
fix: name prop not properly syncing
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
source: tests/tests/build.rs
|
||||||
|
assertion_line: 108
|
||||||
|
expression: contents
|
||||||
|
---
|
||||||
|
<roblox version="4">
|
||||||
|
<Item class="Folder" referent="0">
|
||||||
|
<Properties>
|
||||||
|
<string name="Name">slugified_name_roundtrip</string>
|
||||||
|
</Properties>
|
||||||
|
<Item class="Script" referent="1">
|
||||||
|
<Properties>
|
||||||
|
<string name="Name">/Script</string>
|
||||||
|
<token name="RunContext">0</token>
|
||||||
|
<string name="Source"><![CDATA[print("Hello world!")
|
||||||
|
]]></string>
|
||||||
|
</Properties>
|
||||||
|
</Item>
|
||||||
|
</Item>
|
||||||
|
</roblox>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"name": "/Script"
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
print("Hello world!")
|
||||||
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"name": "slugified_name_roundtrip",
|
||||||
|
"tree": {
|
||||||
|
"$path": "src"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"name": "/Script"
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
print("Hello world!")
|
||||||
@@ -245,6 +245,9 @@ impl AdjacentMetadata {
|
|||||||
self.path.display()
|
self.path.display()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if let Some(name) = &self.name {
|
||||||
|
snapshot.name = name.clone().into();
|
||||||
|
}
|
||||||
snapshot.metadata.specified_name = self.name.take();
|
snapshot.metadata.specified_name = self.name.take();
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
@@ -534,6 +537,9 @@ impl DirectoryMetadata {
|
|||||||
self.path.display()
|
self.path.display()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if let Some(name) = &self.name {
|
||||||
|
snapshot.name = name.clone().into();
|
||||||
|
}
|
||||||
snapshot.metadata.specified_name = self.name.take();
|
snapshot.metadata.specified_name = self.name.take();
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ gen_build_tests! {
|
|||||||
script_meta_disabled,
|
script_meta_disabled,
|
||||||
server_in_folder,
|
server_in_folder,
|
||||||
server_init,
|
server_init,
|
||||||
|
slugified_name_roundtrip,
|
||||||
txt,
|
txt,
|
||||||
txt_in_folder,
|
txt_in_folder,
|
||||||
unresolved_values,
|
unresolved_values,
|
||||||
|
|||||||
Reference in New Issue
Block a user