pulumi/pkg/testing/integration/program_test.go
Joe Duffy f6e694c72b Rename pulumi-fabric to pulumi
This includes a few changes:

* The repo name -- and hence the Go modules -- changes from pulumi-fabric to pulumi.

* The Node.js SDK package changes from @pulumi/pulumi-fabric to just pulumi.

* The CLI is renamed from lumi to pulumi.
2017-09-21 19:18:21 -07:00

22 lines
536 B
Go

// Copyright 2016-2017, Pulumi Corporation. All rights reserved.
package integration
import (
"bytes"
"testing"
"github.com/stretchr/testify/assert"
"github.com/pulumi/pulumi/pkg/util/contract"
)
func TestPrefixer(t *testing.T) {
byts := make([]byte, 0, 1000)
buf := bytes.NewBuffer(byts)
prefixer := newPrefixer(buf, "OK: ")
_, err := prefixer.Write([]byte("\nsadsada\n\nasdsadsa\nasdsadsa\n"))
contract.Assert(err == nil)
assert.Equal(t, []byte("OK: \nOK: sadsada\nOK: \nOK: asdsadsa\nOK: asdsadsa\n"), buf.Bytes())
}