This file is indexed.

/usr/share/gocode/src/github.com/smartystreets/goconvey/web/server/parser/parser_test.go is in golang-github-smartystreets-goconvey-dev 1.5.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package parser

import (
	"testing"

	. "github.com/smartystreets/goconvey/convey"
	"github.com/smartystreets/goconvey/web/server/contract"
)

func TestParser(t *testing.T) {
	var (
		parser   *Parser
		packages = []*contract.Package{
			&contract.Package{Active: true, Output: "Active!", Result: contract.NewPackageResult("asdf")},
			&contract.Package{Active: false, Output: "Inactive!", Result: contract.NewPackageResult("qwer")},
		}
	)

	Convey("Subject: Parser parses test output for active packages", t, func() {
		parser = NewParser(fakeParserImplementation)

		Convey("When given a collection of packages", func() {
			parser.Parse(packages)

			Convey("The parser uses its internal parsing mechanism to parse the output of only the active packages", func() {
				So(packages[0].Result.Outcome, ShouldEqual, packages[0].Output)
			})

			Convey("The parser should mark inactive packages as ignored", func() {
				So(packages[1].Result.Outcome, ShouldEqual, contract.Ignored)
			})
		})
	})
}

func fakeParserImplementation(result *contract.PackageResult, rawOutput string) {
	result.Outcome = rawOutput
}