File: format_test.go

package info (click to toggle)
golang-github-hashicorp-go-multierror 0.0~git20150916.0.d30f099-1~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 124 kB
  • sloc: makefile: 2
file content (23 lines) | stat: -rw-r--r-- 304 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package multierror

import (
	"errors"
	"testing"
)

func TestListFormatFunc(t *testing.T) {
	expected := `2 error(s) occurred:

* foo
* bar`

	errors := []error{
		errors.New("foo"),
		errors.New("bar"),
	}

	actual := ListFormatFunc(errors)
	if actual != expected {
		t.Fatalf("bad: %#v", actual)
	}
}