Documentation ¶
Overview ¶
Package command offers utility functions for testing commands
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertCmdEquals ¶
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.