Skip to content

Commit b3982ec

Browse files
committed
args: inverse the methods in ExactValidArgs
1 parent ec47402 commit b3982ec

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

args.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,5 @@ func MatchAll(pargs ...PositionalArgs) PositionalArgs {
113113
//
114114
// Deprecated: use MatchAll(OnlyValidArgs, ExactArgs(n)) instead
115115
func ExactValidArgs(n int) PositionalArgs {
116-
return MatchAll(OnlyValidArgs, ExactArgs(n))
116+
return MatchAll(ExactArgs(n), OnlyValidArgs)
117117
}

args_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ func TestExactValidArgs_WithInvalidCount(t *testing.T) {
488488
func TestExactValidArgs_WithInvalidCount_WithInvalidArgs(t *testing.T) {
489489
c := getCommand(ExactValidArgs(3), true)
490490
_, err := executeCommand(c, "three", "a", "two")
491-
validOnlyWithInvalidArgs(err, t)
491+
exactArgsWithInvalidCount(err, t)
492492
}
493493

494494
func TestExactValidArgs_WithInvalidArgs(t *testing.T) {

0 commit comments

Comments
 (0)