buf: github.com/bufbuild/buf/internal/pkg/app/appcmd/appcmdtesting Index | Files

package appcmdtesting

import "github.com/bufbuild/buf/internal/pkg/app/appcmd/appcmdtesting"

Index

Package Files

appcmdtesting.go

func RunCommandExitCode Uses

func RunCommandExitCode(
    t *testing.T,
    newCommand func(string) *appcmd.Command,
    expectedExitCode int,
    env map[string]string,
    stdin io.Reader,
    stdout io.Writer,
    stderr io.Writer,
    args ...string,
)

RunCommandExitCode runs the command and compares the exit code.

func RunCommandExitCodeStderr Uses

func RunCommandExitCodeStderr(
    t *testing.T,
    newCommand func(string) *appcmd.Command,
    expectedExitCode int,
    expectedStderr string,
    env map[string]string,
    stdin io.Reader,
    args ...string,
)

RunCommandExitCodeStderr runs the command and compares the exit code and stderr output.

func RunCommandExitCodeStdout Uses

func RunCommandExitCodeStdout(
    t *testing.T,
    newCommand func(string) *appcmd.Command,
    expectedExitCode int,
    expectedStdout string,
    env map[string]string,
    stdin io.Reader,
    args ...string,
)

RunCommandExitCodeStdout runs the command and compares the exit code and stdout output.

func RunCommandSuccess Uses

func RunCommandSuccess(
    t *testing.T,
    newCommand func(string) *appcmd.Command,
    env map[string]string,
    stdin io.Reader,
    stdout io.Writer,
    args ...string,
)

RunCommandSuccess runs the command and makes sure it was successful.

func RunCommandSuccessStdout Uses

func RunCommandSuccessStdout(
    t *testing.T,
    newCommand func(string) *appcmd.Command,
    expectedStdout string,
    env map[string]string,
    stdin io.Reader,
    args ...string,
)

RunCommandSuccessStdout runs the command and makes sure it was successful, and compares the stdout output.

Package appcmdtesting imports 8 packages (graph). Updated 2020-10-20. Refresh now. Tools for package owners.