forked from rojo-rbx/rojo
@@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
source: rojo-test/src/serve_test.rs
|
||||||
|
expression: "read_response.intern_and_redact(&mut redactions, root_id)"
|
||||||
|
---
|
||||||
|
instances:
|
||||||
|
id-2:
|
||||||
|
Children: []
|
||||||
|
ClassName: ModuleScript
|
||||||
|
Id: id-2
|
||||||
|
Metadata:
|
||||||
|
ignoreUnknownInstances: false
|
||||||
|
Name: edit_init
|
||||||
|
Parent: ~
|
||||||
|
Properties:
|
||||||
|
Source:
|
||||||
|
Type: String
|
||||||
|
Value: "-- Edited contents"
|
||||||
|
messageCursor: 1
|
||||||
|
sessionId: id-1
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
source: rojo-test/src/serve_test.rs
|
||||||
|
expression: "read_response.intern_and_redact(&mut redactions, root_id)"
|
||||||
|
---
|
||||||
|
instances:
|
||||||
|
id-2:
|
||||||
|
Children: []
|
||||||
|
ClassName: ModuleScript
|
||||||
|
Id: id-2
|
||||||
|
Metadata:
|
||||||
|
ignoreUnknownInstances: false
|
||||||
|
Name: edit_init
|
||||||
|
Parent: ~
|
||||||
|
Properties:
|
||||||
|
Source:
|
||||||
|
Type: String
|
||||||
|
Value: "-- Original contents"
|
||||||
|
messageCursor: 0
|
||||||
|
sessionId: id-1
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
source: rojo-test/src/serve_test.rs
|
||||||
|
expression: redactions.redacted_yaml(info)
|
||||||
|
---
|
||||||
|
expectedPlaceIds: ~
|
||||||
|
protocolVersion: 3
|
||||||
|
rootInstanceId: id-2
|
||||||
|
serverVersion: 0.6.0-dev
|
||||||
|
sessionId: id-1
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
source: rojo-test/src/serve_test.rs
|
||||||
|
expression: "subscribe_response.intern_and_redact(&mut redactions, ())"
|
||||||
|
---
|
||||||
|
messageCursor: 1
|
||||||
|
messages:
|
||||||
|
- added: {}
|
||||||
|
removed: []
|
||||||
|
updated:
|
||||||
|
- changedClassName: ~
|
||||||
|
changedMetadata: ~
|
||||||
|
changedName: ~
|
||||||
|
changedProperties:
|
||||||
|
Source:
|
||||||
|
Type: String
|
||||||
|
Value: "-- Edited contents"
|
||||||
|
id: id-2
|
||||||
|
sessionId: id-1
|
||||||
@@ -132,9 +132,6 @@ fn remove_file() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
// Editing an init file currently crashes the ChangeProcessor thread.
|
|
||||||
// https://github.com/rojo-rbx/rojo/issues/267
|
|
||||||
#[ignore]
|
|
||||||
fn edit_init() {
|
fn edit_init() {
|
||||||
run_serve_test("edit_init", |session, mut redactions| {
|
run_serve_test("edit_init", |session, mut redactions| {
|
||||||
let info = session.get_api_rojo().unwrap();
|
let info = session.get_api_rojo().unwrap();
|
||||||
@@ -148,7 +145,7 @@ fn edit_init() {
|
|||||||
read_response.intern_and_redact(&mut redactions, root_id)
|
read_response.intern_and_redact(&mut redactions, root_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
fs::write(session.path().join("init.lua"), b"-- Edited contents.").unwrap();
|
fs::write(session.path().join("init.lua"), b"-- Edited contents").unwrap();
|
||||||
|
|
||||||
let subscribe_response = session.get_api_subscribe(0).unwrap();
|
let subscribe_response = session.get_api_subscribe(0).unwrap();
|
||||||
assert_yaml_snapshot!(
|
assert_yaml_snapshot!(
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ fn snapshot_init<F: VfsFetcher>(
|
|||||||
|
|
||||||
init_snapshot.name = dir_snapshot.name;
|
init_snapshot.name = dir_snapshot.name;
|
||||||
init_snapshot.children = dir_snapshot.children;
|
init_snapshot.children = dir_snapshot.children;
|
||||||
// TODO: Apply metadata from folder
|
init_snapshot.metadata = dir_snapshot.metadata;
|
||||||
|
|
||||||
return Ok(Some(init_snapshot));
|
return Ok(Some(init_snapshot));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user