Sha256: 7c758c5053be5b4f24f3767cf7777f4a3fc2d5859f3f6d33bda212b88dddaadf

Contents?: true

Size: 391 Bytes

Versions: 3

Compression:

Stored size: 391 Bytes

Contents

# Test for lib/facets/regexp/arity

require 'facets/regexp/arity.rb'

require 'test/unit'

class TestRegexpArity < Test::Unit::TestCase

  def test_arity
    r = /(1)(2)(3)/
    assert_equal( 3, r.arity )
    r = /(1)(2)(3)(4)/
    assert_equal( 4, r.arity )
    r = /(1)(2)((a)3)/
    assert_equal( 4, r.arity )
    r = /(?#nothing)(1)(2)(3)(?=3)/
    assert_equal( 3, r.arity )
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
facets-2.2.1 test/unit/regexp/test_arity.rb
facets-2.2.0 test/unit/regexp/test_arity.rb
facets-2.3.0 test/core/regexp/test_arity.rb