Skip to content

Commit

Permalink
feat(compliance): pull in final extra tests and change VT to newline
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Dec 22, 2024
1 parent b332eed commit 3e8b2f4
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 6 deletions.
11 changes: 6 additions & 5 deletions src/v2_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1578,11 +1578,12 @@ fn escline_test() {
assert_eq!(node.entries().len(), 2);
}

pub(crate) static NEWLINES: [&str; 7] = [
pub(crate) static NEWLINES: [&str; 8] = [
"\u{000D}\u{000A}",
"\u{000D}",
"\u{000A}",
"\u{0085}",
"\u{000B}",
"\u{000C}",
"\u{2028}",
"\u{2029}",
Expand All @@ -1609,10 +1610,10 @@ fn ws(input: &mut Input<'_>) -> PResult<()> {
alt((unicode_space, multi_line_comment)).parse_next(input)
}

static UNICODE_SPACES: [char; 19] = [
'\u{0009}', '\u{000B}', '\u{0020}', '\u{00A0}', '\u{1680}', '\u{2000}', '\u{2001}', '\u{2002}',
'\u{2003}', '\u{2004}', '\u{2005}', '\u{2006}', '\u{2007}', '\u{2008}', '\u{2009}', '\u{200A}',
'\u{202F}', '\u{205F}', '\u{3000}',
static UNICODE_SPACES: [char; 18] = [
'\u{0009}', '\u{0020}', '\u{00A0}', '\u{1680}', '\u{2000}', '\u{2001}',
'\u{2002}', '\u{2003}', '\u{2004}', '\u{2005}', '\u{2006}', '\u{2007}',
'\u{2008}', '\u{2009}', '\u{200A}', '\u{202F}', '\u{205F}', '\u{3000}',
];

/// `unicode-space := <See Table>`
Expand Down
1 change: 1 addition & 0 deletions tests/test_cases/expected_kdl/vertical_tab_whitespace.kdl
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node arg
node2 arg2
2 changes: 1 addition & 1 deletion tests/test_cases/input/vertical_tab_whitespace.kdl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
node arg
node arg node2 arg2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node"string"
1 change: 1 addition & 0 deletions tests/test_cases/input/zero_space_before_prop_fail.kdl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node foo="value"bar=5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node "string"1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node "string"/-1

0 comments on commit 3e8b2f4

Please sign in to comment.