command

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package command offers utility functions for testing commands

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertCmdEquals

func AssertCmdEquals(expected, actual string) bool

AssertCmdEquals asserts if two commands have the same options according to the following rules: - Flags can appear in any order. - Arguments must appear in the same order. - Flags and arguments can be mixed.

Examples: expected actual result --------------------------------------------------------------- cmd subcmd -a a -b b arg cmd subcmd -a a -b b arg true cmd subcmd -a a -b b arg cmd subcmd -b b -a a arg true cmd subcmd -a a -b b arg cmd -a a -b b subcmd arg true cmd subcmd -a a -b b arg cmd -a a -b b arg subcmd false

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL