Sha256: da59639f07a773a42a02d9f24f47eefacbf5816c24e63c695ad78d74334d82d0

Contents?: true

Size: 775 Bytes

Versions: 12

Compression:

Stored size: 775 Bytes

Contents

#!/usr/bin/env ruby

require "../lib/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

12 entries across 12 versions & 1 rubygems

Version Path
como-0.2.4 test/como_rule_2
como-0.2.3 test/como_rule_2
como-0.2.2 test/como_rule_2
como-0.2.1 test/como_rule_2
como-0.2.0 test/como_rule_2
como-0.1.7 test/como_rule_2
como-0.1.6 test/como_rule_2
como-0.1.5 test/como_rule_2
como-0.1.4 test/como_rule_2
como-0.1.3 test/como_rule_2
como-0.1.2 test/como_rule_2
como-0.1.1 test/como_rule_2