summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint/files/buildlink3_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkgtools/pkglint/files/buildlink3_test.go')
-rw-r--r--pkgtools/pkglint/files/buildlink3_test.go29
1 files changed, 29 insertions, 0 deletions
diff --git a/pkgtools/pkglint/files/buildlink3_test.go b/pkgtools/pkglint/files/buildlink3_test.go
index aaf306236e1..0e071e84db5 100644
--- a/pkgtools/pkglint/files/buildlink3_test.go
+++ b/pkgtools/pkglint/files/buildlink3_test.go
@@ -506,6 +506,35 @@ func (s *Suite) Test_Buildlink3Checker_Check__no_tracing(c *check.C) {
t.CheckOutputEmpty()
}
+func (s *Suite) Test_Buildlink3Checker_checkFirstParagraph__comment_before_tree(c *check.C) {
+ t := s.Init(c)
+
+ t.SetUpPkgsrc()
+ t.SetUpPackage("category/package")
+ t.CreateFileLines("category/package/buildlink3.mk",
+ MkCvsID,
+ "",
+ "# comment",
+ "BUILDLINK_TREE+=\tpackage",
+ "",
+ ".if !defined(PACKAGE_BUILDLINK3_MK)",
+ "PACKAGE_BUILDLINK3_MK:=",
+ "",
+ "BUILDLINK_API_DEPENDS.package+=\tpackage>=0",
+ "BUILDLINK_PKGSRCDIR.package?=\t../../category/package",
+ "BUILDLINK_DEPMETHOD.package?=\tbuild",
+ "",
+ ".endif # PACKAGE_BUILDLINK3_MK",
+ "",
+ "BUILDLINK_TREE+=\t-package")
+ t.FinishSetUp()
+
+ G.Check(t.File("category/package/buildlink3.mk"))
+
+ // No warning in line 3. Comments are ok there.
+ t.CheckOutputEmpty()
+}
+
func (s *Suite) Test_Buildlink3Checker_checkUniquePkgbase(c *check.C) {
t := s.Init(c)