Skip to content

Commit 63348d2

Browse files
committed
Adjusted formatting tests with more trailing comma cases
Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech>
1 parent 6ed066f commit 63348d2

4 files changed

Lines changed: 84 additions & 1 deletion

File tree

tests/format/003_wrapping.expected.cf

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,30 @@ bundle agent nested_function_calls
116116
"ten",
117117
),
118118
);
119+
120+
"variable_name"
121+
string => concat(
122+
"one",
123+
"two",
124+
"three",
125+
concat("two", "three", "four", "five", "six", "seven", "eight"),
126+
);
127+
128+
"variable_name"
129+
string => concat(
130+
"one",
131+
"two",
132+
"three",
133+
concat("two", "three", "four", "five", "six", "seven", "eight"),
134+
);
135+
136+
"variable_name"
137+
string => concat(
138+
"one",
139+
"two",
140+
"three",
141+
# comment a
142+
concat("two", "three", "four", "five", "six", "seven", "eight"),
143+
# comment b
144+
);
119145
}

tests/format/003_wrapping.input.cf

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,30 @@ concat("two", "three", "four", "five", "six", "seven", "eight", "nine", ""),
6363
"one",
6464
concat("two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"),
6565
);
66+
67+
"variable_name"
68+
string => concat(
69+
"one",
70+
"two",
71+
"three",
72+
concat("two", "three", "four", "five", "six", "seven", "eight",),
73+
);
74+
75+
"variable_name"
76+
string => concat(
77+
"one",
78+
"two",
79+
"three",
80+
concat("two", "three", "four", "five", "six", "seven", "eight")
81+
);
82+
83+
"variable_name"
84+
string => concat(
85+
"one",
86+
"two",
87+
"three",
88+
# comment a
89+
concat("two", "three", "four", "five", "six", "seven", "eight",)
90+
# comment b
91+
);
6692
}

tests/format/010_stakeholder.expected.cf

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ bundle agent main
4747
"for",
4848
"this",
4949
"promise",
50-
};
50+
};
5151

5252
packages:
5353
any::
@@ -97,5 +97,22 @@ bundle agent main
9797
"for",
9898
"this",
9999
"promise",
100+
};
101+
}
102+
103+
bundle agent yoda
104+
{
105+
reports:
106+
"hi" -> { "yoda", "boba" };
107+
}
108+
109+
bundle agent yoda_two
110+
{
111+
reports:
112+
"hi" -> {
113+
"yoda",
114+
# this is yoda of course
115+
"boba",
116+
# and yet another star wars character
100117
};
101118
}

tests/format/010_stakeholder.input.cf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,17 @@ comment => "foo";
8282
"promise",
8383
};
8484
}
85+
86+
bundle agent yoda
87+
{
88+
reports: "hi" -> { "yoda", "boba", };
89+
}
90+
91+
bundle agent yoda_two
92+
{
93+
reports:
94+
"hi" -> {
95+
"yoda", # this is yoda of course
96+
"boba" # and yet another star wars character
97+
};
98+
}

0 commit comments

Comments
 (0)