Skip to content

Commit 4ce942c

Browse files
committed
Expanded formatting tests for comments
Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
1 parent 339c69d commit 4ce942c

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

tests/format/004_comments.expected.cf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ bundle agent main
99
# Inside promise, next to attributes
1010
string => "value";
1111

12+
# Before next promise
1213
"some_list"
1314
slist => {
1415
"Strings that go in a list which would be long",
@@ -24,4 +25,12 @@ bundle agent main
2425
if => "something",
2526
# Inside promise, next to attributes
2627
string => "value";
28+
29+
# A class guard shifts everything over 2 spaces:
30+
class_guard::
31+
# Inside promise type
32+
"some_var"
33+
if => "something",
34+
# Inside promise, next to attributes
35+
string => "value";
2736
}

tests/format/004_comments.input.cf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ if => "something",
99
# Inside promise, next to attributes
1010
string => "value";
1111

12+
# Before next promise
1213
"some_list"
1314
slist => {
1415
"Strings that go in a list which would be long",
@@ -17,6 +18,13 @@ slist => {
1718
"More and more and more and more",
1819
};
1920

21+
# A class guard shifts everything over 2 spaces:
22+
class_guard::
23+
# Inside promise type
24+
"some_var"
25+
if => "something",
26+
# Inside promise, next to attributes
27+
string => "value";
2028
# A class guard shifts everything over 2 spaces:
2129
class_guard::
2230
# Inside promise type

0 commit comments

Comments
 (0)