diff options
author | rillig <rillig@pkgsrc.org> | 2019-07-30 18:31:43 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2019-07-30 18:31:43 +0000 |
commit | 75a885d2ce518842297cdc1c2f896effc7ea1327 (patch) | |
tree | e1bd9b70484051c19e2e134cba926394377a682c /pkgtools | |
parent | a946f62e9b56b6281958e8e0de3b514852ac9ed9 (diff) | |
download | pkgsrc-75a885d2ce518842297cdc1c2f896effc7ea1327.tar.gz |
pkgtools/pkglint: fix test for doc/CHANGES removals
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/files/pkgsrc.go | 2 | ||||
-rw-r--r-- | pkgtools/pkglint/files/pkgsrc_test.go | 22 |
2 files changed, 23 insertions, 1 deletions
diff --git a/pkgtools/pkglint/files/pkgsrc.go b/pkgtools/pkglint/files/pkgsrc.go index 6f836e30f25..4edce89e51d 100644 --- a/pkgtools/pkglint/files/pkgsrc.go +++ b/pkgtools/pkglint/files/pkgsrc.go @@ -613,7 +613,7 @@ func (src *Pkgsrc) loadDocChanges() { } func (src *Pkgsrc) checkRemovedAfterLastFreeze() { - if src.LastFreezeStart == "" || G.Wip { + if src.LastFreezeStart == "" || G.Wip || !G.Opts.CheckGlobal { return } diff --git a/pkgtools/pkglint/files/pkgsrc_test.go b/pkgtools/pkglint/files/pkgsrc_test.go index d58a88e85ab..ec0616b7946 100644 --- a/pkgtools/pkglint/files/pkgsrc_test.go +++ b/pkgtools/pkglint/files/pkgsrc_test.go @@ -277,6 +277,28 @@ func (s *Suite) Test_Pkgsrc_checkRemovedAfterLastFreeze(c *check.C) { t.SetUpPackage("category/still-there") t.FinishSetUp() + // No error message since -Cglobal is not given. + t.CheckOutputEmpty() +} + +func (s *Suite) Test_Pkgsrc_checkRemovedAfterLastFreeze__check_global(c *check.C) { + t := s.Init(c) + + t.SetUpCommandLine("-Wall", "-Cglobal", "--source") + t.CreateFileLines("doc/CHANGES-2019", + CvsID, + "", + "\tUpdated category/updated-before to 1.0 [updater 2019-04-01]", + "\tmk/bsd.pkg.mk: started freeze for pkgsrc-2019Q1 branch [freezer 2019-06-21]", + "\tmk/bsd.pkg.mk: freeze ended for pkgsrc-2019Q1 branch [freezer 2019-06-25]", + "\tUpdated category/updated-after to 1.0 [updater 2019-07-01]", + "\tAdded category/added-after version 1.0 [updater 2019-07-01]", + "\tMoved category/moved-from to category/moved-to [author 2019-07-02]", + "\tDowngraded category/downgraded to 1.0 [author 2019-07-03]", + "\tUpdated category/still-there to 1.0 [updater 2019-07-04]") + t.SetUpPackage("category/still-there") + t.FinishSetUp() + // It doesn't matter whether the last visible package change was before // or after the latest freeze. The crucial point is that the most // interesting change is the invisible one, which is the removal. |