MCPcopy
hub / github.com/rclone/rclone / checkArgs

Method checkArgs

cmd/bisync/bisync_test.go:960–972  ·  view source on GitHub ↗

checkArgs verifies the number of the test command arguments

(args []string, min, max int)

Source from the content-addressed store, hash-verified

958
959// checkArgs verifies the number of the test command arguments
960func (b *bisyncTest) checkArgs(args []string, min, max int) {
961 cmd := args[0]
962 num := len(args) - 1
963 if min == max && num != min {
964 b.t.Fatalf("%q must have strictly %d args", cmd, min)
965 }
966 if min > 0 && num < min {
967 b.t.Fatalf("%q must have at least %d args", cmd, min)
968 }
969 if max > 0 && num > max {
970 b.t.Fatalf("%q must have at most %d args", cmd, max)
971 }
972}
973
974func (b *bisyncTest) checkPreReqs(ctx context.Context, opt *bisync.Options) (context.Context, *bisync.Options) {
975 // check pre-requisites

Callers 1

runTestStepMethod · 0.95

Calls 1

FatalfMethod · 0.80

Tested by

no test coverage detected