@@ -173,40 +173,30 @@ var _ = Describe("Process Metrics", func() {
173
173
174
174
var _ = Describe ("ProcessNewlineChars" , func () {
175
175
type testCase struct {
176
- input string
177
- deduplicate bool
178
- trim bool
179
- expected string
176
+ input string
177
+ expected string
180
178
}
181
179
182
180
DescribeTable ("should" ,
183
181
func (given testCase ) {
184
- actual := string (processNewlineChars ([]byte (given .input ), given . deduplicate , given . trim ))
182
+ actual := string (processNewlineChars ([]byte (given .input )))
185
183
Expect (actual ).To (Equal (given .expected ))
186
184
},
187
185
Entry ("should not deduplicate or trim newline characters" , testCase {
188
- input : "This is a test.\n \n This is another test.\n " ,
189
- deduplicate : false ,
190
- trim : false ,
191
- expected : "This is a test.\n \n This is another test.\n " ,
186
+ input : "This is a test.\n \n This is another test.\n " ,
187
+ expected : "This is a test.\n \n This is another test.\n " ,
192
188
}),
193
189
Entry ("should deduplicate newline characters" , testCase {
194
- input : "This is a test.\n \n \n This is another test.\n " ,
195
- deduplicate : true ,
196
- trim : false ,
197
- expected : "This is a test.\n This is another test.\n " ,
190
+ input : "This is a test.\n \n \n This is another test.\n " ,
191
+ expected : "This is a test.\n This is another test.\n " ,
198
192
}),
199
193
Entry ("should trim leading and trailing newline characters" , testCase {
200
- input : "\n This is a test.\n \n This is another test\n \n " ,
201
- deduplicate : false ,
202
- trim : true ,
203
- expected : "This is a test.\n \n This is another test" ,
194
+ input : "\n This is a test.\n \n This is another test\n \n " ,
195
+ expected : "This is a test.\n \n This is another test" ,
204
196
}),
205
197
Entry ("should deduplicate and trim newline characters" , testCase {
206
- input : "\n This is a test.\n \n \n This is another test\n " ,
207
- deduplicate : true ,
208
- trim : true ,
209
- expected : "This is a test.\n This is another test" ,
198
+ input : "\n This is a test.\n \n \n This is another test\n " ,
199
+ expected : "This is a test.\n This is another test" ,
210
200
}),
211
201
)
212
202
})
@@ -217,7 +207,7 @@ var _ = Describe("Dedup", func() {
217
207
expected string
218
208
}
219
209
DescribeTable ("should" , func (given testCase ) {
220
- actual := string (dedupFn ([]byte (given .input ), '\n' , '\n' ))
210
+ actual := string (dedup ([]byte (given .input ), '\n' , '\n' ))
221
211
Expect (actual ).To (Equal (given .expected ))
222
212
},
223
213
Entry ("should deduplicate newline characters" , testCase {
0 commit comments