summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint/files/plist_test.go
blob: 7c2bfee093e92146e4159b04ceae7f9d0c16e958 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package main

import (
	check "gopkg.in/check.v1"
)

func (s *Suite) TestChecklinesPlist(c *check.C) {
	lines := s.NewLines("PLIST",
		"bin/i386/6c",
		"bin/program",
		"@exec ${MKDIR} include/pkgbase",
		"${PLIST.man}man/cat3/strcpy.4",
		"${PLIST.obsolete}@unexec rmdir /tmp")

	checklinesPlist(lines)

	c.Check(s.Output(), equals, ""+
		"ERROR: PLIST:1: Expected \"@comment $NetBSD: plist_test.go,v 1.2 2015/12/02 21:46:46 rillig Exp $\".\n"+
		"WARN: PLIST:1: The bin/ directory should not have subdirectories.\n"+
		"WARN: PLIST:5: Please remove this line. It is no longer necessary.\n")
}