package snappy
import (
"os"
"os/exec"
"testing"
. "launchpad.net/gocheck"
)
// Hook up gocheck into the "go test" runner
func Test(t *testing.T) { TestingT(t) }
var _ = Suite(&InfoSuite{})
type InfoSuite struct{}
func (s *InfoSuite) TestInfo(c *C) {
framework := os.Getenv("framework")
cmd := exec.Command("snappy", "info")
output, err := cmd.Output()
c.Assert(err, IsNil)
expected :=
"^release: ubuntu-core/.*/(edge|stable)\n" +
".*\n" +
"frameworks: " + framework + "\n" +
".*\n"
c.Assert(string(output), Matches, expected)
}