Skip to content

Commit

Permalink
ValidatePackageInfo: add optional License field
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin authored and ssiccha committed Mar 27, 2019
1 parent a89852c commit 33f97dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/package.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2206,6 +2206,9 @@ InstallGlobalFunction( ValidatePackageInfo, function( info )
x -> IsString(x) and Length(x) = 10 and x{ [3,6] } = "//"
and ForAll( x{ [1,2,4,5,7,8,9,10] }, IsDigitChar ),
"a string of the form `dd/mm/yyyy'" );
TestOption( record, "License",
x -> IsString(x) and 0 < Length(x),
"a nonempty string containing an SPDX ID" );
TestMandat( record, "ArchiveURL", IsURL, "a string started with http://, https:// or ftp://" );
TestMandat( record, "ArchiveFormats", IsString, "a string" );
TestOption( record, "TextFiles", IsStringList, "a list of strings" );
Expand Down
1 change: 1 addition & 0 deletions tst/mockpkg/PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ PackageName := "mockpkg",
Subtitle := "A mock package for use by the GAP test suite",
Version := "0.1",
Date := "21/03/2018", # dd/mm/yyyy format
License := "GPL-2.0-or-later",

Persons := [
rec(
Expand Down

0 comments on commit 33f97dd

Please sign in to comment.