Sha256: e00f90c2232703d05e6fd35b487fdc6c23d67e9365da9131598564b10c3c810a

Contents?: true

Size: 562 Bytes

Versions: 8

Compression:

Stored size: 562 Bytes

Contents

#!/usr/bin/env ruby

require 'test/unit'
require "Getopt/Declare"


class TC_Finish < Test::Unit::TestCase

  def setup
    @args = Getopt::Declare.new(<<'EOPARAM', :build)
        --verbose		Print verbose info
        --			Traditional argument list terminator
                                                { finish }
EOPARAM
  end

  def test_verbose
    @args.parse("--verbose")
    assert_equal( '--verbose', @args['--verbose'] )
  end

  def test_terminator
    @args.parse("--verbose -- crapola")
    assert_equal( ['crapola'], @args.unused )
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
getopt-declare-1.32 test/test_cmdline_finish.rb
getopt-declare-1.31 test/test_cmdline_finish.rb
getopt-declare-1.30 test/test_cmdline_finish.rb
getopt-declare-1.29 test/test_cmdline_finish.rb
getopt-declare-1.28 test/test_cmdline_finish.rb
getopt-declare-1.25 test/test_cmdline_finish.rb
getopt-declare-1.26 test/test_cmdline_finish.rb
getopt-declare-1.27 test/test_cmdline_finish.rb