diff --git a/rojo-test/syncback-test-snapshots/end_to_end__rojo_test__syncback_util__project_default_properties_remove-stdout.snap b/rojo-test/syncback-test-snapshots/end_to_end__rojo_test__syncback_util__project_default_properties_remove-stdout.snap new file mode 100644 index 00000000..3ef76951 --- /dev/null +++ b/rojo-test/syncback-test-snapshots/end_to_end__rojo_test__syncback_util__project_default_properties_remove-stdout.snap @@ -0,0 +1,5 @@ +--- +source: tests/rojo_test/syncback_util.rs +expression: "String::from_utf8_lossy(&output.stdout)" +--- +Writing default.project.json diff --git a/rojo-test/syncback-test-snapshots/end_to_end__tests__syncback__project_default_properties_remove-default.project.json.snap b/rojo-test/syncback-test-snapshots/end_to_end__tests__syncback__project_default_properties_remove-default.project.json.snap new file mode 100644 index 00000000..cff09018 --- /dev/null +++ b/rojo-test/syncback-test-snapshots/end_to_end__tests__syncback__project_default_properties_remove-default.project.json.snap @@ -0,0 +1,50 @@ +--- +source: tests/tests/syncback.rs +expression: default.project.json +--- +{ + "name": "SyncbackTest", + "tree": { + "$className": "DataModel", + "Workspace": { + "$className": "Workspace", + "TestPart": { + "$className": "Part", + "$properties": { + "Anchored": true, + "Color": { + "Color3uint8": [ + 0, + 0, + 255 + ] + } + } + }, + "$properties": { + "EnableSLIMAvatars": { + "Enum": 0 + }, + "ImprovedAnimationConstraint": { + "Enum": 0 + }, + "ImprovedPhysicsReplication": { + "Enum": 0 + }, + "LayeredClothingCacheOptimizations": { + "Enum": 0 + }, + "MeshStreamingAndImprovedLods": { + "Enum": 0 + }, + "UseNewLuauTypeSolver": "Disabled", + "ValidateEnabledProximityPrompt": { + "Enum": 0 + } + }, + "$attributes": { + "Rojo_Target_CurrentCamera": "302d573157260ee80a3baa32000003b5" + } + } + } +} diff --git a/rojo-test/syncback-tests/project_default_properties_remove/input-project/default.project.json b/rojo-test/syncback-tests/project_default_properties_remove/input-project/default.project.json new file mode 100644 index 00000000..6f0b1ade --- /dev/null +++ b/rojo-test/syncback-tests/project_default_properties_remove/input-project/default.project.json @@ -0,0 +1,21 @@ +{ + "name": "SyncbackTest", + "tree": { + "$className": "DataModel", + "Workspace": { + "$className": "Workspace", + "TestPart": { + "$className": "Part", + "$properties": { + "Transparency": 1.0, + "Anchored": true, + "Color": [ + 1.0, + 0.0, + 0.0 + ] + } + } + } + } +} \ No newline at end of file diff --git a/rojo-test/syncback-tests/project_default_properties_remove/input.rbxl b/rojo-test/syncback-tests/project_default_properties_remove/input.rbxl new file mode 100644 index 00000000..7ca3700a Binary files /dev/null and b/rojo-test/syncback-tests/project_default_properties_remove/input.rbxl differ diff --git a/tests/tests/syncback.rs b/tests/tests/syncback.rs index 31553496..cffccccb 100644 --- a/tests/tests/syncback.rs +++ b/tests/tests/syncback.rs @@ -86,4 +86,7 @@ syncback_tests! { sync_rules => ["src/module.modulescript", "src/text.text"], // Ensures that the `syncUnscriptable` setting works unscriptable_properties => ["default.project.json"], + // Ensures that syncback correctly removes default values from projects rather + // than leaving an incorrect value. + project_default_properties_remove => ["default.project.json"], }