mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-24 01:38:26 +02:00
Add formatter test for escaped characters
This commit is contained in:
@@ -151,6 +151,19 @@ mod test {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_escaped() {
|
||||||
|
assert_eq!(
|
||||||
|
format_json(r#"{"foo":"Hi \"world!\""}"#, " "),
|
||||||
|
r#"
|
||||||
|
{
|
||||||
|
"foo": "Hi \"world!\""
|
||||||
|
}
|
||||||
|
"#
|
||||||
|
.trim()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_simple_array() {
|
fn test_simple_array() {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
@@ -219,7 +232,7 @@ mod test {
|
|||||||
.trim()
|
.trim()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_graphql_response() {
|
fn test_graphql_response() {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
|
|||||||
Reference in New Issue
Block a user