Sha256: ab1694b33fa92febf8e6fba9ee89d21071b0a7bfe8981553dc3d9034948f51f9

Contents?: true

Size: 768 Bytes

Versions: 1

Compression:

Stored size: 768 Bytes

Contents

#!/usr/bin/env ruby

require "como"
include Como

Spec.command( "como_rule_2", "Como Tester", "2013",
  [
    [ :exclusive, "doc", nil, "Documentation." ],
    [ :opt_single, "file", "-f", "File argument." ],
    [ :switch, "debug", nil, "Enable debugging." ],
    [ :opt_single, "mode", "-m", "Mode." ],
    [ :opt_multi, "params", nil, "Parameters." ],
    [ :opt_any, "types", "-t", "Types." ],
    [ :silent, "terminator", "-", "The terminator." ],
    [ :opt_multi, "dir", "-d", "Directory argument(s)." ],
    [ :default, "Leftovers." ],
  ] )


Spec.checkRule do
    one(
        any( 'debug', 'mode' ),
        follow( '-', nil, '-d', meh( 'debug' ) ),
        incr( 'params', 'types' ),
        none,
        all( one( 'dir' ), one( 'file' ) ),
        )
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
como-0.1.0 test/como_rule_2