[BACK]Return to licenses_test.go CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / pkgtools / pkglint / files

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /pkgsrc/pkgtools/pkglint/files/licenses_test.go between version 1.7 and 1.8

version 1.7, 2017/01/17 22:37:27 version 1.8, 2017/01/29 14:27:48
Line 14  func (s *Suite) Test_checklineLicense(c 
Line 14  func (s *Suite) Test_checklineLicense(c 
         licenseChecker := &LicenseChecker{mkline}          licenseChecker := &LicenseChecker{mkline}
         licenseChecker.Check("gpl-v2", opAssign)          licenseChecker.Check("gpl-v2", opAssign)
   
         c.Check(s.Output(), equals, "WARN: Makefile:7: License file ~/licenses/gpl-v2 does not exist.\n")          s.CheckOutputLines(
                   "WARN: Makefile:7: License file ~/licenses/gpl-v2 does not exist.")
   
         licenseChecker.Check("no-profit shareware", opAssign)          licenseChecker.Check("no-profit shareware", opAssign)
   
         c.Check(s.Output(), equals, "ERROR: Makefile:7: Parse error for license condition \"no-profit shareware\".\n")          s.CheckOutputLines(
                   "ERROR: Makefile:7: Parse error for license condition \"no-profit shareware\".")
   
         licenseChecker.Check("no-profit AND shareware", opAssign)          licenseChecker.Check("no-profit AND shareware", opAssign)
   
         c.Check(s.Output(), equals, ""+          s.CheckOutputLines(
                 "WARN: Makefile:7: License file ~/licenses/no-profit does not exist.\n"+                  "WARN: Makefile:7: License file ~/licenses/no-profit does not exist.",
                 "ERROR: Makefile:7: License \"no-profit\" must not be used.\n"+                  "ERROR: Makefile:7: License \"no-profit\" must not be used.",
                 "WARN: Makefile:7: License file ~/licenses/shareware does not exist.\n"+                  "WARN: Makefile:7: License file ~/licenses/shareware does not exist.",
                 "ERROR: Makefile:7: License \"shareware\" must not be used.\n")                  "ERROR: Makefile:7: License \"shareware\" must not be used.")
   
         licenseChecker.Check("gnu-gpl-v2", opAssign)          licenseChecker.Check("gnu-gpl-v2", opAssign)
   
         c.Check(s.Output(), equals, "")          s.CheckOutputEmpty()
   
         licenseChecker.Check("gnu-gpl-v2 AND gnu-gpl-v2 OR gnu-gpl-v2", opAssign)          licenseChecker.Check("gnu-gpl-v2 AND gnu-gpl-v2 OR gnu-gpl-v2", opAssign)
   
         c.Check(s.Output(), equals, "ERROR: Makefile:7: AND and OR operators in license conditions can only be combined using parentheses.\n")          s.CheckOutputLines(
                   "ERROR: Makefile:7: AND and OR operators in license conditions can only be combined using parentheses.")
   
         licenseChecker.Check("(gnu-gpl-v2 OR gnu-gpl-v2) AND gnu-gpl-v2", opAssign)          licenseChecker.Check("(gnu-gpl-v2 OR gnu-gpl-v2) AND gnu-gpl-v2", opAssign)
   
         c.Check(s.Output(), equals, "")          s.CheckOutputEmpty()
 }  }

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

CVSweb <webmaster@jp.NetBSD.org>