mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-25 07:06:12 +00:00
Unlike most of the other backports, this code couldn't be directly translated so it had to be re-implemented. Luckily, it is very simple. This implementation is a bit messy and heavy handed with potential panics, but I think it's probably fine since file names that aren't UTF-8 aren't really supported anyway. The original implementation is a lot cleaner though. The test snapshots are (almost) all identical between the 7.5 implementation and this one. The sole exception is with the path in the `snapshot_middleware::project` test, since I didn't feel like adding a `name` parameter to `snapshot_project` in this implementation.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "top-level",
|
||||
"tree": {
|
||||
"$className": "Folder",
|
||||
"second-level": {
|
||||
"$path": "src"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"tree": {
|
||||
"$className": "IntValue",
|
||||
"$properties": {
|
||||
"Value": 1337
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "no_name_project",
|
||||
"tree": {
|
||||
"$className": "Folder",
|
||||
"second-level": {
|
||||
"$path": "src"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"tree": {
|
||||
"$className": "BoolValue",
|
||||
"$properties": {
|
||||
"Value": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"tree": {
|
||||
"$className": "StringValue",
|
||||
"$properties": {
|
||||
"Value": "If this isn't named `no_name_top_level_project`, something went wrong!"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user