Skip to content

Commit

Permalink
Make linewise comment unittests more precise. Add test for comment be…
Browse files Browse the repository at this point in the history
…tween sign and constant.
  • Loading branch information
jumarini committed Nov 5, 2024
1 parent ce7d7f8 commit 615575a
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions test/formattest.textpb
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,23 @@ dict_value { # test after dict start token on same line
// ^ punctuation.definition.comment.textproto
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^ comment.line.number-sign.textproto
#test between code
// <~- punctuation.whitespace.comment.leading.textproto
// <-- punctuation.whitespace.comment.leading.textproto
// <~~- punctuation.definition.comment.textproto
// <~~----------------------------------------- comment.line.number-sign.textproto
// <~~----------------- comment.line.number-sign.textproto
# test successive lines
// <~- punctuation.whitespace.comment.leading.textproto
// <-- punctuation.whitespace.comment.leading.textproto
// <~~- punctuation.definition.comment.textproto
// <~~----------------------------------------- comment.line.number-sign.textproto
// <~~----------------------- comment.line.number-sign.textproto

[test]: #{dict:"value"} # test commented value
// ^ punctuation.whitespace.comment.leading.textproto
// ^ punctuation.definition.comment.textproto
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ comment.line.number-sign.textproto
// ^ - punctuation.definition.comment.textproto

separated_value: -
# test between sign and literal
// <-- punctuation.whitespace.comment.leading.textproto
// <~~- punctuation.definition.comment.textproto
// <~~------------------------------- comment.line.number-sign.textproto
2.0

0 comments on commit 615575a

Please sign in to comment.