@@ -107,7 +107,7 @@ func TestRedundantLibraryProperties(t *testing.T) {
107
107
func TestLibraryPropertiesFormat (t * testing.T ) {
108
108
testTables := []libraryCheckFunctionTestTable {
109
109
{"Invalid" , "InvalidLibraryProperties" , checkresult .Fail , "" },
110
- {"Legacy" , "Legacy" , checkresult .NotRun , "" },
110
+ {"Legacy" , "Legacy" , checkresult .Skip , "" },
111
111
{"Valid" , "Recursive" , checkresult .Pass , "" },
112
112
}
113
113
@@ -240,11 +240,11 @@ func TestLibraryPropertiesVersionFieldBehindTag(t *testing.T) {
240
240
}
241
241
242
242
testTables := []libraryCheckFunctionTestTable {
243
- // TODO: Test NotRun if subproject
243
+ // TODO: Test Skip if subproject
244
244
{"Unable to load" , "InvalidLibraryProperties" , checkresult .NotRun , "" },
245
245
{"Legacy" , "Legacy" , checkresult .NotRun , "" },
246
246
{"Unparsable version" , "VersionFormatInvalid" , checkresult .NotRun , "" },
247
- {"Not repo" , "Recursive" , checkresult .NotRun , "" },
247
+ {"Not repo" , "Recursive" , checkresult .Skip , "" },
248
248
{"Tag name not a version" , gitInitAndTag (t , TagNotVersionPath , "foo" , true ), checkresult .Pass , "" },
249
249
{"Match w/ tag prefix" , gitInitAndTag (t , TagMatchWithPrefixPath , "1.0.0" , true ), checkresult .Pass , "" },
250
250
{"Pre-release tag greater" , gitInitAndTag (t , TagPrereleaseGreaterPath , "1.0.1-rc1" , true ), checkresult .Pass , "" },
@@ -262,7 +262,7 @@ func TestLibraryPropertiesVersionFieldBehindTag(t *testing.T) {
262
262
func TestLibraryPropertiesSentenceFieldSpellCheck (t * testing.T ) {
263
263
testTables := []libraryCheckFunctionTestTable {
264
264
{"Unable to load" , "InvalidLibraryProperties" , checkresult .NotRun , "" },
265
- {"Not defined" , "MissingFields" , checkresult .NotRun , "" },
265
+ {"Not defined" , "MissingFields" , checkresult .Skip , "" },
266
266
{"Misspelled word" , "MisspelledSentenceParagraphValue" , checkresult .Fail , "^grill broccoli now$" },
267
267
{"Non-nil diff but no typos" , "SpuriousMisspelledSentenceParagraphValue" , checkresult .Pass , "" },
268
268
{"Correct spelling" , "Recursive" , checkresult .Pass , "" },
@@ -274,7 +274,7 @@ func TestLibraryPropertiesSentenceFieldSpellCheck(t *testing.T) {
274
274
func TestLibraryPropertiesParagraphFieldSpellCheck (t * testing.T ) {
275
275
testTables := []libraryCheckFunctionTestTable {
276
276
{"Unable to load" , "InvalidLibraryProperties" , checkresult .NotRun , "" },
277
- {"Not defined" , "MissingFields" , checkresult .NotRun , "" },
277
+ {"Not defined" , "MissingFields" , checkresult .Skip , "" },
278
278
{"Misspelled word" , "MisspelledSentenceParagraphValue" , checkresult .Fail , "^There is a zebra$" },
279
279
{"Non-nil diff but no typos" , "SpuriousMisspelledSentenceParagraphValue" , checkresult .Pass , "" },
280
280
{"Correct spelling" , "Recursive" , checkresult .Pass , "" },
@@ -283,6 +283,17 @@ func TestLibraryPropertiesParagraphFieldSpellCheck(t *testing.T) {
283
283
checkLibraryCheckFunction (LibraryPropertiesParagraphFieldSpellCheck , testTables , t )
284
284
}
285
285
286
+ func TestLibraryPropertiesEmailFieldAsMaintainerAlias (t * testing.T ) {
287
+ testTables := []libraryCheckFunctionTestTable {
288
+ {"Unable to load" , "InvalidLibraryProperties" , checkresult .NotRun , "" },
289
+ {"No email field" , "MissingFields" , checkresult .Skip , "" },
290
+ {"email in place of maintainer" , "EmailOnly" , checkresult .Fail , "" },
291
+ {"email and maintainer" , "EmailAndMaintainer" , checkresult .Pass , "" },
292
+ }
293
+
294
+ checkLibraryCheckFunction (LibraryPropertiesEmailFieldAsMaintainerAlias , testTables , t )
295
+ }
296
+
286
297
func TestLibraryPropertiesParagraphFieldRepeatsSentence (t * testing.T ) {
287
298
testTables := []libraryCheckFunctionTestTable {
288
299
{"Unable to load" , "InvalidLibraryProperties" , checkresult .NotRun , "" },
@@ -292,6 +303,18 @@ func TestLibraryPropertiesParagraphFieldRepeatsSentence(t *testing.T) {
292
303
293
304
checkLibraryCheckFunction (LibraryPropertiesParagraphFieldRepeatsSentence , testTables , t )
294
305
}
306
+
307
+ func TestLibraryPropertiesCategoryFieldUncategorized (t * testing.T ) {
308
+ testTables := []libraryCheckFunctionTestTable {
309
+ {"Unable to load" , "InvalidLibraryProperties" , checkresult .NotRun , "" },
310
+ {"No category field" , "MissingFields" , checkresult .Skip , "" },
311
+ {"Uncategorized category" , "UncategorizedCategoryValue" , checkresult .Fail , "" },
312
+ {"Valid category value" , "Recursive" , checkresult .Pass , "" },
313
+ }
314
+
315
+ checkLibraryCheckFunction (LibraryPropertiesCategoryFieldUncategorized , testTables , t )
316
+ }
317
+
295
318
func TestLibraryPropertiesUrlFieldDeadLink (t * testing.T ) {
296
319
testTables := []libraryCheckFunctionTestTable {
297
320
{"Unable to load" , "InvalidLibraryProperties" , checkresult .NotRun , "" },
@@ -310,7 +333,7 @@ func TestLibraryPropertiesDependsFieldNotInIndex(t *testing.T) {
310
333
{"Dependency not in index" , "DependsNotIndexed" , checkresult .Fail , "^NotIndexed$" },
311
334
{"Dependency in index" , "DependsIndexed" , checkresult .Pass , "" },
312
335
{"Depends field empty" , "DependsEmpty" , checkresult .Pass , "" },
313
- {"No depends" , "NoDepends" , checkresult .NotRun , "" },
336
+ {"No depends" , "NoDepends" , checkresult .Skip , "" },
314
337
}
315
338
316
339
checkLibraryCheckFunction (LibraryPropertiesDependsFieldNotInIndex , testTables , t )
@@ -319,7 +342,7 @@ func TestLibraryPropertiesDependsFieldNotInIndex(t *testing.T) {
319
342
func TestLibraryPropertiesDotALinkageFieldTrueWithFlatLayout (t * testing.T ) {
320
343
testTables := []libraryCheckFunctionTestTable {
321
344
{"Unable to load" , "InvalidLibraryProperties" , checkresult .NotRun , "" },
322
- {"Not defined" , "MissingFields" , checkresult .NotRun , "" },
345
+ {"Not defined" , "MissingFields" , checkresult .Skip , "" },
323
346
{"Flat layout" , "DotALinkageFlat" , checkresult .Fail , "" },
324
347
{"Recursive layout" , "DotALinkage" , checkresult .Pass , "" },
325
348
}
@@ -330,7 +353,7 @@ func TestLibraryPropertiesDotALinkageFieldTrueWithFlatLayout(t *testing.T) {
330
353
func TestLibraryPropertiesIncludesFieldItemNotFound (t * testing.T ) {
331
354
testTables := []libraryCheckFunctionTestTable {
332
355
{"Unable to load" , "InvalidLibraryProperties" , checkresult .NotRun , "" },
333
- {"Not defined" , "MissingFields" , checkresult .NotRun , "" },
356
+ {"Not defined" , "MissingFields" , checkresult .Skip , "" },
334
357
{"Missing includes" , "MissingIncludes" , checkresult .Fail , "^Nonexistent.h$" },
335
358
{"Present includes" , "Recursive" , checkresult .Pass , "" },
336
359
}
@@ -341,11 +364,11 @@ func TestLibraryPropertiesIncludesFieldItemNotFound(t *testing.T) {
341
364
func TestLibraryPropertiesPrecompiledFieldEnabledWithFlatLayout (t * testing.T ) {
342
365
testTables := []libraryCheckFunctionTestTable {
343
366
{"Unable to load" , "InvalidLibraryProperties" , checkresult .NotRun , "" },
344
- {"Not defined" , "MissingFields" , checkresult .NotRun , "" },
367
+ {"Not defined" , "MissingFields" , checkresult .Skip , "" },
345
368
{"Flat layout" , "PrecompiledFlat" , checkresult .Fail , "^true$" },
346
369
{"Recursive layout" , "Precompiled" , checkresult .Pass , "" },
347
- {"Recursive, not precompiled" , "NotPrecompiled" , checkresult .NotRun , "" },
348
- {"Flat, not precompiled" , "Flat" , checkresult .NotRun , "" },
370
+ {"Recursive, not precompiled" , "NotPrecompiled" , checkresult .Skip , "" },
371
+ {"Flat, not precompiled" , "Flat" , checkresult .Skip , "" },
349
372
}
350
373
351
374
checkLibraryCheckFunction (LibraryPropertiesPrecompiledFieldEnabledWithFlatLayout , testTables , t )
@@ -444,7 +467,7 @@ func TestLibraryFolderNameGTMaxLength(t *testing.T) {
444
467
445
468
func TestIncorrectLibrarySrcFolderNameCase (t * testing.T ) {
446
469
testTables := []libraryCheckFunctionTestTable {
447
- {"Flat, not precompiled" , "Flat" , checkresult .NotRun , "" },
470
+ {"Flat, not precompiled" , "Flat" , checkresult .Skip , "" },
448
471
{"Incorrect case" , "IncorrectSrcFolderNameCase" , checkresult .Fail , "" },
449
472
{"Correct case" , "Recursive" , checkresult .Pass , "" },
450
473
}
@@ -505,7 +528,7 @@ func TestIncorrectExtrasFolderNameCase(t *testing.T) {
505
528
func TestRecursiveLibraryWithUtilityFolder (t * testing.T ) {
506
529
testTables := []libraryCheckFunctionTestTable {
507
530
{"Unable to load" , "InvalidLibraryProperties" , checkresult .NotRun , "" },
508
- {"Flat" , "Flat" , checkresult .NotRun , "" },
531
+ {"Flat" , "Flat" , checkresult .Skip , "" },
509
532
{"Recursive with utility" , "RecursiveWithUtilityFolder" , checkresult .Fail , "" },
510
533
{"Recursive without utility" , "Recursive" , checkresult .Pass , "" },
511
534
}
0 commit comments