mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 14:01:37 +00:00
json5 work
This commit is contained in:
parent
cd63b5c9c0
commit
fdd1d145cf
22 changed files with 1977 additions and 90 deletions
|
|
@ -516,8 +516,11 @@ mod test {
|
|||
)
|
||||
.unwrap();
|
||||
|
||||
let serialized = serde_json::to_string(&project_node).unwrap();
|
||||
assert_eq!(serialized, r#"{"$path":{"optional":"../src"}}"#);
|
||||
let serialized = json5::to_string(&project_node).unwrap();
|
||||
assert_eq!(
|
||||
serialized,
|
||||
"{\n $path: {\n optional: \"../src\",\n },\n}"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
@ -529,8 +532,11 @@ mod test {
|
|||
)
|
||||
.unwrap();
|
||||
|
||||
let serialized = serde_json::to_string(&project_node).unwrap();
|
||||
assert_eq!(serialized, r#"{"$path":{"optional":"../src"}}"#);
|
||||
let serialized = json5::to_string(&project_node).unwrap();
|
||||
assert_eq!(
|
||||
serialized,
|
||||
"{\n $path: {\n optional: \"../src\",\n },\n}"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
@ -542,8 +548,9 @@ mod test {
|
|||
)
|
||||
.unwrap();
|
||||
|
||||
let serialized = serde_json::to_string(&project_node).unwrap();
|
||||
assert_eq!(serialized, r#"{"$path":"../src"}"#);
|
||||
let serialized = json5::to_string(&project_node).unwrap();
|
||||
// Backslashes normalized to forward slashes
|
||||
assert_eq!(serialized, "{\n $path: \"../src\",\n}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue