diff --git a/tests/test_cases/input/multiline_string_whitespace_only.kdl b/tests/test_cases/input/multiline_string_whitespace_only.kdl index d3bd045..db8fee5 100644 --- a/tests/test_cases/input/multiline_string_whitespace_only.kdl +++ b/tests/test_cases/input/multiline_string_whitespace_only.kdl @@ -1,18 +1,19 @@ // This file deliberately contains unusual whitespace -// The first two strings are empty +// The first three strings are empty, because whitespace-only lines collapse to +// just `\n`. node """   """ """    \ -    +        """ """ -    +      """\ \ // The next two strings contains only whitespace """    - +       \s    """ #""" -     +      """# diff --git a/tests/test_cases/input/multiline_string_whitespace_only_non_matching_prefix_fail.kdl b/tests/test_cases/input/multiline_string_whitespace_only_non_matching_prefix_fail.kdl new file mode 100644 index 0000000..29e36df --- /dev/null +++ b/tests/test_cases/input/multiline_string_whitespace_only_non_matching_prefix_fail.kdl @@ -0,0 +1,19 @@ +// This file deliberately contains unusual whitespace +// Parsing should fail because not all strings have a matching multiline prefix, +// which must be exact, down to the codepoint, _before_ newline normalization. +node """ +  """ """ +   \ +    +   """ """ +    + """\ + \ // The next two strings contains only whitespace + """ +    + +    \s +    """ #""" +     + + """#