Sha256: 7badbeed4ac8f776a5be90e06849848e7df78e203625fccd71fd867e51ff2077

Contents?: true

Size: 401 Bytes

Versions: 21

Compression:

Stored size: 401 Bytes

Contents

require File.expand_path(__FILE__).sub(%r(/test/.*), '/test/test_helper.rb')
require 'scout/simple_opt'
require File.expand_path(__FILE__).sub(%r(.*/test/), '').sub(/test_(.*)\.rb/,'\1')

class TestSOPTParse < Test::Unit::TestCase
  def test_consume
    SOPT.parse("-f--first* first arg:-f--fun")
    args = "-f myfile --fun".split(" ")
    assert_equal "myfile", SOPT.consume(args)[:first]
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
scout-essentials-1.6.3 test/scout/simple_opt/test_get.rb
scout-essentials-1.6.2 test/scout/simple_opt/test_get.rb
scout-essentials-1.6.1 test/scout/simple_opt/test_get.rb
scout-essentials-1.6.0 test/scout/simple_opt/test_get.rb
scout-essentials-1.3.1 test/scout/simple_opt/test_get.rb
scout-essentials-1.3.0 test/scout/simple_opt/test_get.rb
scout-essentials-1.2.0 test/scout/simple_opt/test_get.rb
scout-essentials-1.1.1 test/scout/simple_opt/test_get.rb
scout-essentials-1.1.0 test/scout/simple_opt/test_get.rb
scout-essentials-1.0.0 test/scout/simple_opt/test_get.rb
scout-gear-9.1.0 test/scout/simple_opt/test_get.rb
scout-gear-9.0.0 test/scout/simple_opt/test_get.rb
scout-gear-8.1.0 test/scout/simple_opt/test_get.rb
scout-gear-8.0.0 test/scout/simple_opt/test_get.rb
scout-gear-7.3.0 test/scout/simple_opt/test_get.rb
scout-gear-7.2.0 test/scout/simple_opt/test_get.rb
scout-gear-7.1.0 test/scout/simple_opt/test_get.rb
scout-gear-6.0.0 test/scout/simple_opt/test_get.rb
scout-gear-5.2.0 test/scout/simple_opt/test_get.rb
scout-gear-5.1.1 test/scout/simple_opt/test_get.rb