#![cfg(all(feature = "serialize", feature = "deserialize"))]
#[test]
fn test_double_quoted_strings_process_escape_sequences() {
let y = "\"line1\\nline2\\t\\\\\\\"\\u0041\"\n";
let s: String = serde_saphyr::from_str(y).expect("Failed to parse double-quoted scalar");
assert_eq!(s, "line1\nline2\t\\\"A");
}
#[test]
fn test_single_quoted_strings_do_not_process_backslash_escapes_but_double_quotes() {
let y = "'line1\\nline2\\t\\\\\\\"\\u0041 and it''s fine'\n";
let s: String = serde_saphyr::from_str(y).expect("Failed to parse single-quoted scalar");
assert_eq!(s, "line1\\nline2\\t\\\\\\\"\\u0041 and it's fine");
}