Files
clang-p2996/llvm/test/YAMLParser/spec-10-02.test
Igor Kudrin 652ceaddc0 [YAMLParser] Unfold multi-line scalar values (#70898)
Long scalar values can be split into multiple lines to improve
readability. The rules are described in Section 6.5. "Line Folding",
https://yaml.org/spec/1.2.2/#65-line-folding. In addition, for flow
scalar styles, the Spec states that "All leading and trailing white
space characters on each line are excluded from the content",
https://yaml.org/spec/1.2.2/#73-flow-scalar-styles.

The patch implements these unfolding rules for double-quoted,
single-quoted, and plain scalars.
2023-11-10 07:19:24 +07:00

23 lines
499 B
Plaintext

# RUN: yaml-bench -canonical %s | FileCheck %s --strict-whitespace
# CHECK: !!seq [
# CHECK-NEXT: !!str "double quoted",
# CHECK-NEXT: !!str "single quoted",
# CHECK-NEXT: !!str "plain text",
# CHECK-NEXT: !!seq [
# CHECK-NEXT: !!str "nested",
# CHECK-NEXT: ],
# CHECK-NEXT: !!map {
# CHECK-NEXT: ? !!str "single"
# CHECK-NEXT: : !!str "pair",
# CHECK-NEXT: },
# CHECK-NEXT: ]
[
"double
quoted", 'single
quoted',
plain
text, [ nested ],
single: pair ,
]