Fix invalid multiline string output in REPL

If a PlainLine string contains a newline character, the REPL will print
the string using a triple-quoted block string.
This commit is contained in:
raleng 2022-08-23 10:10:39 +02:00
parent 5e8faf64be
commit 1b2952bc70
No known key found for this signature in database
GPG key ID: A7DBF700E0E77020
2 changed files with 30 additions and 2 deletions

View file

@ -542,7 +542,18 @@ fn four_element_record() {
#[test]
fn multiline_string() {
// If a string contains newlines, format it as a multiline string in the output
expect_success(r#""\n\nhi!\n\n""#, "\"\n\nhi!\n\n\" : Str");
expect_success(
r#""\n\nhi!\n\n""#,
indoc!(
r#""""
hi!
""" : Str"#
),
);
}
#[test]