@@ -216,12 +216,75 @@ func TestDiagnose_newDiagnoseCmd(t *testing.T) {
216
216
wantErr bool
217
217
}{
218
218
{
219
- name : "no problems" ,
219
+ name : "bundler with no problems" ,
220
220
command : "--package bundler --file ruby/bundler/testdata/Gemfile.lock" ,
221
221
wantOutWriter : "" ,
222
222
wantErrWriter : "" ,
223
223
wantErr : false ,
224
224
},
225
+ {
226
+ name : "yarn" ,
227
+ command : "--package yarn --file nodejs/yarn/testdata/yarn.lock" ,
228
+ wantOutWriter : "" ,
229
+ wantErrWriter : "" ,
230
+ wantErr : false ,
231
+ },
232
+ {
233
+ name : "npm" ,
234
+ command : "--package npm --file nodejs/npm/testdata/package-lock.json" ,
235
+ wantOutWriter : "" ,
236
+ wantErrWriter : "" ,
237
+ wantErr : false ,
238
+ },
239
+ {
240
+ name : "pip" ,
241
+ command : "--package pip --file python/pip/testdata/requirements.txt" ,
242
+ wantOutWriter : "" ,
243
+ wantErrWriter : "" ,
244
+ wantErr : false ,
245
+ },
246
+ {
247
+ name : "pipenv" ,
248
+ command : "--package pipenv --file python/pipenv/testdata/Pipfile.lock" ,
249
+ wantOutWriter : "" ,
250
+ wantErrWriter : "has error" ,
251
+ wantErr : true ,
252
+ },
253
+ {
254
+ name : "golang" ,
255
+ command : "--package golang --file golang/mod/testdata/go.mod" ,
256
+ wantOutWriter : "" ,
257
+ wantErrWriter : "has error" ,
258
+ wantErr : true ,
259
+ },
260
+ {
261
+ name : "cargo" ,
262
+ command : "--package cargo --file rust/cargo/testdata/cargo.lock" ,
263
+ wantOutWriter : "" ,
264
+ wantErrWriter : "has error" ,
265
+ wantErr : true ,
266
+ },
267
+ {
268
+ name : "cocoapods" ,
269
+ command : "--package cocoapods --file swift/cocoapods/testdata/Podfile.lock" ,
270
+ wantOutWriter : "" ,
271
+ wantErrWriter : "has error" ,
272
+ wantErr : true ,
273
+ },
274
+ {
275
+ name : "pub" ,
276
+ command : "--package pub --file dart/pub/testdata/podspec.lock" ,
277
+ wantOutWriter : "" ,
278
+ wantErrWriter : "has error" ,
279
+ wantErr : true ,
280
+ },
281
+ {
282
+ name : "mix" ,
283
+ command : "--package mix --file erlang_elixir/hex/testdata/mix.lock" ,
284
+ wantOutWriter : "" ,
285
+ wantErrWriter : "" ,
286
+ wantErr : false ,
287
+ },
225
288
{
226
289
name : "has error" ,
227
290
command : "--package bundler --file ruby/bundler/testdata/Gemfile_error.lock" ,
0 commit comments