Sha256: 7a9f3a1e4b9f5f2d86391579531d64fa4c55a96eaa928568dba2b1e536bb21de

Contents?: true

Size: 888 Bytes

Versions: 2

Compression:

Stored size: 888 Bytes

Contents

#!/usr/bin/env ruby

require "../lib/como"
include Como

Spec.command( "como_type_prim", "Como Tester", "2013",
  [
    [ [ :none, :opt, :mutex ], "doc", nil, "Documentation for option\n\twith too much description\n\tfor one line." ],
    [ [ :one ], "file", "-f", "File argument." ],
    [ :switch, "debug", nil, "Enable debugging." ],
    [ [ :one, :opt ], "mode", "-m", "Mode." ],
    [ [ :one, :many, :repeat, :opt ], "params", nil, "Parameters." ],
    [ [ :none, :one, :many, :repeat, :opt ], "types", "-t", "Types." ],
    [ [ :none, :opt, :hidden ], "terminator", "-", "The terminator." ],
    [ [ :one, :many ], "dir", "-d", "Directory argument(s)." ],
    [ :default, "Leftovers." ],
  ] )


Opt.each do |o|
    puts "Given \"#{o.name}\": #{o.given}"
    puts "Value \"#{o.name}\": #{o.value}" if o.given && o.value
end

if Opt.external
    puts "External: #{Opt.external}"
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
como-0.2.4 test/como_type_prim
como-0.2.3 test/como_type_prim