{"modulePath":"github.com/juamedgod/cliassert","version":"v0.0.0-20180320011200-425256f2bb0b","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cliassert\n\n## Types\n\n```go\ntype CmdResult struct {\n\t// contains filtered or unexported fields\n}\n```\nCmdResult represents a command execution result\n\n```go\nfunc ExecCommand(bin string, args ...string) CmdResult\n```\nExecCommand executes the provided command and returns a CmdResult\n\n```go\nfunc (r CmdResult) AssertCode(t *testing.T, code int) bool\n```\nAssertCode asserts that the command  exit code matched the provided one\n\n```go\nfunc (r CmdResult) AssertError(t *testing.T) bool\n```\nAssertError asserts that the command failed\n\n```go\nfunc (r CmdResult) AssertErrorMatch(t *testing.T, re interface{}) bool\n```\nAssertErrorMatch asserts that the command failed and its stderr matches the provided regexp\n\n```go\nfunc (r CmdResult) AssertSuccess(t *testing.T) bool\n```\nAssertSuccess asserts that the command succeeded (0 exit code)\n\n```go\nfunc (r CmdResult) AssertSuccessMatch(t *testing.T, re interface{}) bool\n```\nAssertSuccessMatch asserts that the command succeeded and its stdout matches the provided regexp\n\n```go\nfunc (r CmdResult) Code() int\n```\nCode returns the command exit code\n\n```go\nfunc (r CmdResult) Stderr() string\n```\nStderr returns the command stderr\n\n```go\nfunc (r CmdResult) Stdout() string\n```\nStdout returns the command stdout\n\n```go\nfunc (r CmdResult) Success() bool\n```\nSuccess returns true if the command exit code is 0 and false otherwhise\n\n```go\ntype Command struct {\n\t// contains filtered or unexported fields\n}\n```\nCommand defines a command executor\n\n```go\nfunc NewCommand() *Command\n```\nNewCommand returns a new Command\n\n```go\nfunc (c *Command) Exec(bin string, args ...string) CmdResult\n```\nExec executes the provided command and returns a CmdResult\n\n```go\nfunc (c *Command) SetStdin(stdin string)\n```\nSetStdin sets the stdin for the command to execute\n\n","path":"github.com/juamedgod/cliassert","name":"cliassert","synopsis":"","isRedistributable":true}
