Hello community,
here is the log from the commit of package golang-gopkgin-check for
openSUSE:Factory checked in at 2017-03-24 02:16:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/golang-gopkgin-check (Old)
and /work/SRC/openSUSE:Factory/.golang-gopkgin-check.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "golang-gopkgin-check"
Fri Mar 24 02:16:06 2017 rev:2 rq:477191 version:0.0.0+git20161122.aa8c435
Changes:
--------
---
/work/SRC/openSUSE:Factory/golang-gopkgin-check/golang-gopkgin-check.changes
2015-08-01 11:36:05.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.golang-gopkgin-check.new/golang-gopkgin-check.changes
2017-03-24 02:16:10.802540671 +0100
@@ -1,0 +2,20 @@
+Thu Dec 08 12:53:10 UTC 2016 - [email protected]
+
+- Update to version 0.0.0+git20161122.aa8c435:
+ * Replaced path.Join with filepath.Join in newPath() in order to facilitate
proper MkDir() on all OS-es
+ * Fixed misleading tempdir removal message under Windows.
+ * Include the whole Go license on benchmark.go.
+ * check: fix data race on C.status
+ * Fix panic tracebacks with Go tip.
+ * Moved the reporter functions to a separate file.
+ * Do not export reporterS.
+ * Get the filename from runtime.
+ * Fix tests and some golint issues (#85)
+ * Fix typo: conjuction (#83)
+
+-------------------------------------------------------------------
+Thu Dec 8 12:49:13 UTC 2016 - [email protected]
+
+- Refactoring based on new packaging proposal
+
+-------------------------------------------------------------------
Old:
----
check-0.0.0+git20150626.b3d3430.tar.xz
New:
----
check-0.0.0+git20161122.aa8c435.tar.xz
rpmlintrc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ golang-gopkgin-check.spec ++++++
--- /var/tmp/diff_new_pack.W4BXk6/_old 2017-03-24 02:16:11.338464842 +0100
+++ /var/tmp/diff_new_pack.W4BXk6/_new 2017-03-24 02:16:11.342464277 +0100
@@ -1,8 +1,7 @@
#
# spec file for package golang-gopkgin-check
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
-# Copyright (c) 2011 Sascha Peilicke <[email protected]>
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,21 +16,28 @@
#
+%global provider github
+%global provider_tld com
+%global project go-check
+%global repo check
+%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
+%global import_path gopkg.in/check.v1
+
Name: golang-gopkgin-check
-Version: 0.0.0+git20150626.b3d3430
+Version: 0.0.0+git20161122.aa8c435
Release: 0
Summary: Rich testing framework for the Go language
License: BSD-3-Clause
-Group: Development/Languages/Other
-Url: https://github.com/go-check/check
-Source: check-%{version}.tar.xz
+Group: Development/Languages/Golang
+Url: https://%{provider_prefix}
+Source0: %{repo}-%{version}.tar.xz
+Source1: rpmlintrc
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
BuildRequires: golang-packaging
BuildRequires: xz
-Provides: go-go-check = %{version}
-Provides: go-gocheck = %{version}
-Obsoletes: go-go-check < %{version}
-Obsoletes: go-go-check < %{version}
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
+%{go_nostrip}
%{go_provides}
%description
@@ -41,42 +47,23 @@
standard library from Go to be working correctly, and builds on it to offer a
richer testing framework for libraries and applications to use.
-It includes features such as:
-
- - Helpful error reporting to aid on figuring problems out (see below)
- - Richer test helpers: assertions which interrupt the test immediately,
- - deep multi-type comparisons, string matching, etc
- - Suite-based grouping of tests
- - Benchmarks integrated in the suite logic (with fixtures, etc)
- - Fixtures: per suite and/or per test set up and tear down
- - Management of temporary directories
- - Panic-catching logic, with proper error reporting
- - Proper counting of successes, failures, panics, missed tests, skips, etc
- - Explicit test skipping
- - Support for expected failures
- - Verbosity flag which disables output caching
- - Fully tested (yes, it manages to test itself reliably! :-)
-
-%gosrc_package
-
%prep
-%setup -q -n check-%{version}
+%setup -q -n %{repo}-%{version}
%build
-%goprep gopkg.in/check.v1
-%gobuild
+%goprep %{import_path}
+%gobuild ...
%install
%goinstall
%gosrc
+%gofilelist
-%files
-%defattr(-,root,root,-)
-%doc LICENSE TODO
-%{go_contribdir}/*
+%check
+#gotest %{import_path}...
-%files source
+%files -f file.lst
%defattr(-,root,root,-)
-%{go_contribsrcdir}/*
+%doc README.md TODO LICENSE
%changelog
++++++ _service ++++++
--- /var/tmp/diff_new_pack.W4BXk6/_old 2017-03-24 02:16:11.378459184 +0100
+++ /var/tmp/diff_new_pack.W4BXk6/_new 2017-03-24 02:16:11.382458618 +0100
@@ -1,16 +1,17 @@
<services>
- <service name="tar_scm" mode="localonly">
- <param name="url">https://github.com/go-check/check.git</param>
+ <service name="tar_scm" mode="disabled">
+ <param name="url">https://github.com/go-check/check</param>
<param name="scm">git</param>
<param name="exclude">.git</param>
<param name="versionformat">0.0.0+git%cd.%h</param>
<param name="revision">v1</param>
+ <param name="changesgenerate">enable</param>
</service>
- <service name="recompress" mode="localonly">
+ <service name="recompress" mode="disabled">
<param name="file">check-*.tar</param>
<param name="compression">xz</param>
</service>
- <service name="set_version" mode="localonly">
+ <service name="set_version" mode="disabled">
<param name="basename">check</param>
</service>
</services>
++++++ check-0.0.0+git20150626.b3d3430.tar.xz ->
check-0.0.0+git20161122.aa8c435.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/check-0.0.0+git20150626.b3d3430/benchmark_test.go
new/check-0.0.0+git20161122.aa8c435/benchmark_test.go
--- old/check-0.0.0+git20150626.b3d3430/benchmark_test.go 2015-07-25
12:41:46.000000000 +0200
+++ new/check-0.0.0+git20161122.aa8c435/benchmark_test.go 2016-11-22
14:57:53.000000000 +0100
@@ -21,8 +21,8 @@
runConf := RunConf{Output: &output, Verbose: true}
Run(&helper, &runConf)
- expected := "PASS: check_test\\.go:[0-9]+:
FixtureHelper\\.Test1\t0\\.001s\n" +
- "PASS: check_test\\.go:[0-9]+:
FixtureHelper\\.Test2\t0\\.000s\n"
+ expected := "PASS: check_test\\.go:[0-9]+:
FixtureHelper\\.Test1\t0\\.0[0-9]+s\n" +
+ "PASS: check_test\\.go:[0-9]+:
FixtureHelper\\.Test2\t0\\.0[0-9]+s\n"
c.Assert(output.value, Matches, expected)
}
@@ -32,7 +32,7 @@
runConf := RunConf{Output: &output, Stream: true}
Run(&helper, &runConf)
- expected := "(?s).*\nPASS: check_test\\.go:[0-9]+:
FixtureHelper\\.SetUpSuite\t *0\\.001s\n.*"
+ expected := "(?s).*\nPASS: check_test\\.go:[0-9]+:
FixtureHelper\\.SetUpSuite\t[0-9]+\\.[0-9]+s\n.*"
c.Assert(output.value, Matches, expected)
}
@@ -55,7 +55,7 @@
c.Check(helper.calls[6], Equals, "TearDownTest")
// ... and more.
- expected := "PASS: check_test\\.go:[0-9]+: FixtureHelper\\.Benchmark1\t
*100\t *[12][0-9]{5} ns/op\n"
+ expected := "PASS: check_test\\.go:[0-9]+:
FixtureHelper\\.Benchmark1\t\\s+[0-9]+\t\\s+[0-9]+ ns/op\n"
c.Assert(output.value, Matches, expected)
}
@@ -70,7 +70,7 @@
}
Run(&helper, &runConf)
- expected := "PASS: check_test\\.go:[0-9]+: FixtureHelper\\.Benchmark2\t
*100\t *[12][0-9]{5} ns/op\t *[4-9]\\.[0-9]{2} MB/s\n"
+ expected := "PASS: check_test\\.go:[0-9]+:
FixtureHelper\\.Benchmark2\t\\s+[0-9]+\t\\s+[0-9]+ ns/op\t\\s+
*[1-9]\\.[0-9]{2} MB/s\n"
c.Assert(output.value, Matches, expected)
}
@@ -86,6 +86,6 @@
}
Run(&helper, &runConf)
- expected := "PASS: check_test\\.go:[0-9]+: FixtureHelper\\.Benchmark3\t
*100\t *[12][0-9]{5} ns/op\t *[0-9]+ B/op\t *[1-9] allocs/op\n"
+ expected := "PASS: check_test\\.go:[0-9]+:
FixtureHelper\\.Benchmark3\t\\s+ [0-9]+\t\\s+ *[0-9]+ ns/op\t\\s+ [0-9]+
B/op\t\\s+ [1-9]+ allocs/op\n"
c.Assert(output.value, Matches, expected)
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/check-0.0.0+git20150626.b3d3430/check.go
new/check-0.0.0+git20161122.aa8c435/check.go
--- old/check-0.0.0+git20150626.b3d3430/check.go 2015-07-25
12:41:46.000000000 +0200
+++ new/check-0.0.0+git20161122.aa8c435/check.go 2016-11-22
14:57:53.000000000 +0100
@@ -156,7 +156,7 @@
}
}
result := filepath.Join(td.path, strconv.Itoa(td.counter))
- td.counter += 1
+ td.counter++
return result
}
@@ -274,7 +274,7 @@
func (c *C) logCaller(skip int) {
// This is a bit heavier than it ought to be.
- skip += 1 // Our own frame.
+ skip++ // Our own frame.
pc, callerFile, callerLine, ok := runtime.Caller(skip)
if !ok {
return
@@ -284,7 +284,7 @@
testFunc := runtime.FuncForPC(c.method.PC())
if runtime.FuncForPC(pc) != testFunc {
for {
- skip += 1
+ skip++
if pc, file, line, ok := runtime.Caller(skip); ok {
// Note that the test line may be different on
// distinct calls for the same test. Showing
@@ -335,7 +335,7 @@
if name == "Value.call" && strings.HasSuffix(path,
valueGo) {
continue
}
- if name == "call16" && strings.Contains(path, asmGo) {
+ if (name == "call16" || name == "call32") &&
strings.Contains(path, asmGo) {
continue
}
c.logf("%s:%d\n in %s", nicePath(file), line, name)
@@ -460,10 +460,10 @@
// Calls still running. Can't stop.
select {
// XXX Reindent this (not now to make diff clear)
- case c = <-tracker._expectChan:
- tracker._waiting += 1
+ case <-tracker._expectChan:
+ tracker._waiting++
case c = <-tracker._doneChan:
- tracker._waiting -= 1
+ tracker._waiting--
switch c.status() {
case succeededSt:
if c.kind == testKd {
@@ -498,9 +498,9 @@
select {
case tracker._stopChan <- true:
return
- case c = <-tracker._expectChan:
- tracker._waiting += 1
- case c = <-tracker._doneChan:
+ case <-tracker._expectChan:
+ tracker._waiting++
+ case <-tracker._doneChan:
panic("Tracker got an unexpected done call.")
}
}
@@ -568,13 +568,13 @@
var filterRegexp *regexp.Regexp
if conf.Filter != "" {
- if regexp, err := regexp.Compile(conf.Filter); err != nil {
+ regexp, err := regexp.Compile(conf.Filter)
+ if err != nil {
msg := "Bad filter expression: " + err.Error()
runner.tracker.result.RunError = errors.New(msg)
return runner
- } else {
- filterRegexp = regexp
}
+ filterRegexp = regexp
}
for i := 0; i != suiteNumMethods; i++ {
@@ -871,84 +871,3 @@
runner.output.WriteCallSuccess("MISS", c)
}
}
-
-// -----------------------------------------------------------------------
-// Output writer manages atomic output writing according to settings.
-
-type outputWriter struct {
- m sync.Mutex
- writer io.Writer
- wroteCallProblemLast bool
- Stream bool
- Verbose bool
-}
-
-func newOutputWriter(writer io.Writer, stream, verbose bool) *outputWriter {
- return &outputWriter{writer: writer, Stream: stream, Verbose: verbose}
-}
-
-func (ow *outputWriter) Write(content []byte) (n int, err error) {
- ow.m.Lock()
- n, err = ow.writer.Write(content)
- ow.m.Unlock()
- return
-}
-
-func (ow *outputWriter) WriteCallStarted(label string, c *C) {
- if ow.Stream {
- header := renderCallHeader(label, c, "", "\n")
- ow.m.Lock()
- ow.writer.Write([]byte(header))
- ow.m.Unlock()
- }
-}
-
-func (ow *outputWriter) WriteCallProblem(label string, c *C) {
- var prefix string
- if !ow.Stream {
- prefix = "\n-----------------------------------" +
- "-----------------------------------\n"
- }
- header := renderCallHeader(label, c, prefix, "\n\n")
- ow.m.Lock()
- ow.wroteCallProblemLast = true
- ow.writer.Write([]byte(header))
- if !ow.Stream {
- c.logb.WriteTo(ow.writer)
- }
- ow.m.Unlock()
-}
-
-func (ow *outputWriter) WriteCallSuccess(label string, c *C) {
- if ow.Stream || (ow.Verbose && c.kind == testKd) {
- // TODO Use a buffer here.
- var suffix string
- if c.reason != "" {
- suffix = " (" + c.reason + ")"
- }
- if c.status() == succeededSt {
- suffix += "\t" + c.timerString()
- }
- suffix += "\n"
- if ow.Stream {
- suffix += "\n"
- }
- header := renderCallHeader(label, c, "", suffix)
- ow.m.Lock()
- // Resist temptation of using line as prefix above due to race.
- if !ow.Stream && ow.wroteCallProblemLast {
- header = "\n-----------------------------------" +
- "-----------------------------------\n" +
- header
- }
- ow.wroteCallProblemLast = false
- ow.writer.Write([]byte(header))
- ow.m.Unlock()
- }
-}
-
-func renderCallHeader(label string, c *C, prefix, suffix string) string {
- pc := c.method.PC()
- return fmt.Sprintf("%s%s: %s: %s%s", prefix, label, niceFuncPath(pc),
- niceFuncName(pc), suffix)
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/check-0.0.0+git20150626.b3d3430/checkers.go
new/check-0.0.0+git20161122.aa8c435/checkers.go
--- old/check-0.0.0+git20150626.b3d3430/checkers.go 2015-07-25
12:41:46.000000000 +0200
+++ new/check-0.0.0+git20161122.aa8c435/checkers.go 2016-11-22
14:57:53.000000000 +0100
@@ -212,7 +212,7 @@
// The HasLen checker verifies that the obtained value has the
// provided length. In many cases this is superior to using Equals
-// in conjuction with the len function because in case the check
+// in conjunction with the len function because in case the check
// fails the value itself will be printed, instead of its length,
// providing more details for figuring the problem.
//
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/check-0.0.0+git20150626.b3d3430/export_test.go
new/check-0.0.0+git20161122.aa8c435/export_test.go
--- old/check-0.0.0+git20150626.b3d3430/export_test.go 2015-07-25
12:41:46.000000000 +0200
+++ new/check-0.0.0+git20161122.aa8c435/export_test.go 2016-11-22
14:57:53.000000000 +0100
@@ -1,5 +1,7 @@
package check
+import "io"
+
func PrintLine(filename string, line int) (string, error) {
return printLine(filename, line)
}
@@ -7,3 +9,11 @@
func Indent(s, with string) string {
return indent(s, with)
}
+
+func NewOutputWriter(writer io.Writer, stream, verbose bool) *outputWriter {
+ return newOutputWriter(writer, stream, verbose)
+}
+
+func (c *C) FakeSkip(reason string) {
+ c.reason = reason
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/check-0.0.0+git20150626.b3d3430/reporter.go
new/check-0.0.0+git20161122.aa8c435/reporter.go
--- old/check-0.0.0+git20150626.b3d3430/reporter.go 1970-01-01
01:00:00.000000000 +0100
+++ new/check-0.0.0+git20161122.aa8c435/reporter.go 2016-11-22
14:57:53.000000000 +0100
@@ -0,0 +1,88 @@
+package check
+
+import (
+ "fmt"
+ "io"
+ "sync"
+)
+
+// -----------------------------------------------------------------------
+// Output writer manages atomic output writing according to settings.
+
+type outputWriter struct {
+ m sync.Mutex
+ writer io.Writer
+ wroteCallProblemLast bool
+ Stream bool
+ Verbose bool
+}
+
+func newOutputWriter(writer io.Writer, stream, verbose bool) *outputWriter {
+ return &outputWriter{writer: writer, Stream: stream, Verbose: verbose}
+}
+
+func (ow *outputWriter) Write(content []byte) (n int, err error) {
+ ow.m.Lock()
+ n, err = ow.writer.Write(content)
+ ow.m.Unlock()
+ return
+}
+
+func (ow *outputWriter) WriteCallStarted(label string, c *C) {
+ if ow.Stream {
+ header := renderCallHeader(label, c, "", "\n")
+ ow.m.Lock()
+ ow.writer.Write([]byte(header))
+ ow.m.Unlock()
+ }
+}
+
+func (ow *outputWriter) WriteCallProblem(label string, c *C) {
+ var prefix string
+ if !ow.Stream {
+ prefix = "\n-----------------------------------" +
+ "-----------------------------------\n"
+ }
+ header := renderCallHeader(label, c, prefix, "\n\n")
+ ow.m.Lock()
+ ow.wroteCallProblemLast = true
+ ow.writer.Write([]byte(header))
+ if !ow.Stream {
+ c.logb.WriteTo(ow.writer)
+ }
+ ow.m.Unlock()
+}
+
+func (ow *outputWriter) WriteCallSuccess(label string, c *C) {
+ if ow.Stream || (ow.Verbose && c.kind == testKd) {
+ // TODO Use a buffer here.
+ var suffix string
+ if c.reason != "" {
+ suffix = " (" + c.reason + ")"
+ }
+ if c.status() == succeededSt {
+ suffix += "\t" + c.timerString()
+ }
+ suffix += "\n"
+ if ow.Stream {
+ suffix += "\n"
+ }
+ header := renderCallHeader(label, c, "", suffix)
+ ow.m.Lock()
+ // Resist temptation of using line as prefix above due to race.
+ if !ow.Stream && ow.wroteCallProblemLast {
+ header = "\n-----------------------------------" +
+ "-----------------------------------\n" +
+ header
+ }
+ ow.wroteCallProblemLast = false
+ ow.writer.Write([]byte(header))
+ ow.m.Unlock()
+ }
+}
+
+func renderCallHeader(label string, c *C, prefix, suffix string) string {
+ pc := c.method.PC()
+ return fmt.Sprintf("%s%s: %s: %s%s", prefix, label, niceFuncPath(pc),
+ niceFuncName(pc), suffix)
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/check-0.0.0+git20150626.b3d3430/reporter_test.go
new/check-0.0.0+git20161122.aa8c435/reporter_test.go
--- old/check-0.0.0+git20150626.b3d3430/reporter_test.go 1970-01-01
01:00:00.000000000 +0100
+++ new/check-0.0.0+git20161122.aa8c435/reporter_test.go 2016-11-22
14:57:53.000000000 +0100
@@ -0,0 +1,159 @@
+package check_test
+
+import (
+ "fmt"
+ "path/filepath"
+ "runtime"
+
+ . "gopkg.in/check.v1"
+)
+
+var _ = Suite(&reporterS{})
+
+type reporterS struct {
+ testFile string
+}
+
+func (s *reporterS) SetUpSuite(c *C) {
+ _, fileName, _, ok := runtime.Caller(0)
+ c.Assert(ok, Equals, true)
+ s.testFile = filepath.Base(fileName)
+}
+
+func (s *reporterS) TestWrite(c *C) {
+ testString := "test string"
+ output := String{}
+
+ dummyStream := true
+ dummyVerbose := true
+ o := NewOutputWriter(&output, dummyStream, dummyVerbose)
+
+ o.Write([]byte(testString))
+ c.Assert(output.value, Equals, testString)
+}
+
+func (s *reporterS) TestWriteCallStartedWithStreamFlag(c *C) {
+ testLabel := "test started label"
+ stream := true
+ output := String{}
+
+ dummyVerbose := true
+ o := NewOutputWriter(&output, stream, dummyVerbose)
+
+ o.WriteCallStarted(testLabel, c)
+ expected := fmt.Sprintf("%s: %s:\\d+: %s\n", testLabel, s.testFile,
c.TestName())
+ c.Assert(output.value, Matches, expected)
+}
+
+func (s *reporterS) TestWriteCallStartedWithoutStreamFlag(c *C) {
+ stream := false
+ output := String{}
+
+ dummyLabel := "dummy"
+ dummyVerbose := true
+ o := NewOutputWriter(&output, stream, dummyVerbose)
+
+ o.WriteCallStarted(dummyLabel, c)
+ c.Assert(output.value, Equals, "")
+}
+
+func (s *reporterS) TestWriteCallProblemWithStreamFlag(c *C) {
+ testLabel := "test problem label"
+ stream := true
+ output := String{}
+
+ dummyVerbose := true
+ o := NewOutputWriter(&output, stream, dummyVerbose)
+
+ o.WriteCallProblem(testLabel, c)
+ expected := fmt.Sprintf("%s: %s:\\d+: %s\n\n", testLabel, s.testFile,
c.TestName())
+ c.Assert(output.value, Matches, expected)
+}
+
+func (s *reporterS) TestWriteCallProblemWithoutStreamFlag(c *C) {
+ testLabel := "test problem label"
+ stream := false
+ output := String{}
+
+ dummyVerbose := true
+ o := NewOutputWriter(&output, stream, dummyVerbose)
+
+ o.WriteCallProblem(testLabel, c)
+ expected := fmt.Sprintf(""+
+ "\n"+
+
"----------------------------------------------------------------------\n"+
+ "%s: %s:\\d+: %s\n\n", testLabel, s.testFile, c.TestName())
+ c.Assert(output.value, Matches, expected)
+}
+
+func (s *reporterS) TestWriteCallProblemWithoutStreamFlagWithLog(c *C) {
+ testLabel := "test problem label"
+ testLog := "test log"
+ stream := false
+ output := String{}
+
+ dummyVerbose := true
+ o := NewOutputWriter(&output, stream, dummyVerbose)
+
+ c.Log(testLog)
+ o.WriteCallProblem(testLabel, c)
+ expected := fmt.Sprintf(""+
+ "\n"+
+
"----------------------------------------------------------------------\n"+
+ "%s: %s:\\d+: %s\n\n%s\n", testLabel, s.testFile, c.TestName(),
testLog)
+ c.Assert(output.value, Matches, expected)
+}
+
+func (s *reporterS) TestWriteCallSuccessWithStreamFlag(c *C) {
+ testLabel := "test success label"
+ stream := true
+ output := String{}
+
+ dummyVerbose := true
+ o := NewOutputWriter(&output, stream, dummyVerbose)
+
+ o.WriteCallSuccess(testLabel, c)
+ expected := fmt.Sprintf("%s: %s:\\d+: %s\t\\d\\.\\d+s\n\n", testLabel,
s.testFile, c.TestName())
+ c.Assert(output.value, Matches, expected)
+}
+
+func (s *reporterS) TestWriteCallSuccessWithStreamFlagAndReason(c *C) {
+ testLabel := "test success label"
+ testReason := "test skip reason"
+ stream := true
+ output := String{}
+
+ dummyVerbose := true
+ o := NewOutputWriter(&output, stream, dummyVerbose)
+ c.FakeSkip(testReason)
+
+ o.WriteCallSuccess(testLabel, c)
+ expected := fmt.Sprintf("%s: %s:\\d+: %s \\(%s\\)\t\\d\\.\\d+s\n\n",
+ testLabel, s.testFile, c.TestName(), testReason)
+ c.Assert(output.value, Matches, expected)
+}
+
+func (s *reporterS) TestWriteCallSuccessWithoutStreamFlagWithVerboseFlag(c *C)
{
+ testLabel := "test success label"
+ stream := false
+ verbose := true
+ output := String{}
+
+ o := NewOutputWriter(&output, stream, verbose)
+
+ o.WriteCallSuccess(testLabel, c)
+ expected := fmt.Sprintf("%s: %s:\\d+: %s\t\\d\\.\\d+s\n", testLabel,
s.testFile, c.TestName())
+ c.Assert(output.value, Matches, expected)
+}
+
+func (s *reporterS) TestWriteCallSuccessWithoutStreamFlagWithoutVerboseFlag(c
*C) {
+ testLabel := "test success label"
+ stream := false
+ verbose := false
+ output := String{}
+
+ o := NewOutputWriter(&output, stream, verbose)
+
+ o.WriteCallSuccess(testLabel, c)
+ c.Assert(output.value, Equals, "")
+}
++++++ rpmlintrc ++++++
# We are preventing the stripping to keep backtraces intact
addFilter("unstripped-binary-or-object")
# Golang doesn't support dynamic linking yet in a proper way
addFilter("statically-linked-binary")
# We are aware of that but shorter names are not possible
addFilter("filename-too-long-for-joliet")