1
1
Fork 0
mirror of https://github.com/goreleaser/nfpm synced 2024-05-24 18:26:13 +02:00
nfpm/deprecation/deprecation_test.go
Carlos Alexandro Becker 2a86957187
feat: add deprecation notice interface (#399)
* feat: add deprecation notice interface

* fix: use a simple writer

* fix: use println
2021-11-12 23:07:18 -03:00

19 lines
375 B
Go

package deprecation
import (
"bytes"
"testing"
"github.com/stretchr/testify/require"
)
func TestNotice(t *testing.T) {
Print("before")
var b bytes.Buffer
Noticer = prefixed{&b}
Print("blah\n")
Printf("blah: %v\n", true)
Println("foobar")
require.Equal(t, "DEPRECATION WARNING: blah\nDEPRECATION WARNING: blah: true\nDEPRECATION WARNING: foobar\n", b.String())
}