Skip to content

Commit

Permalink
Add tests for hastag-only comment lines
Browse files Browse the repository at this point in the history
  • Loading branch information
kv9898 committed Oct 16, 2024
1 parent 5dfb4c1 commit 945fa01
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/ark/src/lsp/symbols.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ mod tests {
fn test_symbol_parse_comment_as_section() {
assert_eq!(parse_comment_as_section("# foo"), None);
assert_eq!(parse_comment_as_section("# foo ---"), None);
assert_eq!(parse_comment_as_section("########"), None);
assert_eq!(
parse_comment_as_section("# foo ----"),
Some((1, String::from("foo")))
Expand All @@ -345,6 +346,7 @@ mod tests {
fn test_symbol_comment_sections() {
assert_eq!(test_symbol("# foo"), vec![]);
assert_eq!(test_symbol("# foo ---"), vec![]);
assert_eq!(test_symbol("########"), vec![]);

let range = Range {
start: Position {
Expand Down

0 comments on commit 945fa01

Please sign in to comment.