[BACK]Return to pkglint_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/Attic/pkglint_test.go between version 1.60 and 1.61

version 1.60, 2020/02/15 13:48:40 version 1.61, 2020/03/18 08:24:49
Line 740  func (s *Suite) Test_resolveVariableRefs
Line 740  func (s *Suite) Test_resolveVariableRefs
         t.CheckEquals(resolved, "gst-plugins0.10-x11/distinfo")          t.CheckEquals(resolved, "gst-plugins0.10-x11/distinfo")
 }  }
   
   func (s *Suite) Test_resolveVariableRefs__indeterminate(c *check.C) {
           t := s.Init(c)
   
           pkg := NewPackage(G.Pkgsrc.File("category/package"))
           pkg.vars.Define("PKGVAR", t.NewMkLine("filename.mk", 123, "PKGVAR!=\tcommand"))
           mklines := t.NewMkLinesPkg("filename.mk", pkg,
                   "VAR!=\tcommand")
           mklines.collectVariables()
   
           resolved := resolveVariableRefs("${VAR} ${PKGVAR}", mklines, nil)
   
           // VAR and PKGVAR are defined, but since they contain the result of
           // a shell command, their value is indeterminate.
           // Therefore they are not replaced.
           t.CheckEquals(resolved, "${VAR} ${PKGVAR}")
   }
   
 // Just for code coverage.  // Just for code coverage.
 func (s *Suite) Test_CheckFileOther__no_tracing(c *check.C) {  func (s *Suite) Test_CheckFileOther__no_tracing(c *check.C) {
         t := s.Init(c)          t := s.Init(c)
Line 1106  func (s *Suite) Test_Pkglint_checkReg__s
Line 1123  func (s *Suite) Test_Pkglint_checkReg__s
                 "WARN: ~/category/package/spec: Only packages in regress/ may have spec files.")                  "WARN: ~/category/package/spec: Only packages in regress/ may have spec files.")
 }  }
   
   func (s *Suite) Test_Pkglint_checkReg__options_mk(c *check.C) {
           t := s.Init(c)
   
           t.SetUpPkgsrc()
           t.CreateFileLines("mk/bsd.options.mk")
           t.CreateFileLines("category/package/options.mk",
                   MkCvsID,
                   "",
                   "PKG_OPTIONS_VAR=\tPKG_OPTIONS.package",
                   "",
                   ".include \"../../mk/bsd.options.mk\"")
           t.FinishSetUp()
   
           G.Check(t.File("category/package/options.mk"))
   
           t.CheckOutputEmpty()
   }
   
 func (s *Suite) Test_Pkglint_checkRegCvsSubst(c *check.C) {  func (s *Suite) Test_Pkglint_checkRegCvsSubst(c *check.C) {
         t := s.Init(c)          t := s.Init(c)
   

Legend:
Removed from v.1.60  
changed lines
  Added in v.1.61

CVSweb <webmaster@jp.NetBSD.org>