Sha256: 9fcdd98fd95d7e31032a28ad2e841e5c42d35a0f744a09001d7a6d5c057c8d5a

Contents?: true

Size: 763 Bytes

Versions: 7

Compression:

Stored size: 763 Bytes

Contents

require File.expand_path("../../../helpers", __FILE__)

class TestSyntaxRuby_V200 < Test::Unit::TestCase
  include Regexp::Syntax::Token

  def setup
    @syntax = Regexp::Syntax.new 'ruby/2.0.0'
  end

  tests = {
    :implements => {
      :property => [
        UnicodeProperty::Age_V200
      ].flatten,

      :nonproperty => [
        UnicodeProperty::Age_V200
      ].flatten,
    },

    :excludes => {
    },
  }

  tests.each do |method, types|
    types.each do |type, tokens|
      tokens.each do |token|
        define_method "test_syntax_ruby_v200_#{method}_#{type}_#{token}" do
          assert_equal(
            method == :excludes ? false : true,
            @syntax.implements?(type, token)
          )
        end
      end
    end
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
regexp_parser-0.3.4 test/syntax/ruby/test_2.0.0.rb
regexp_parser-0.3.3 test/syntax/ruby/test_2.0.0.rb
regexp_parser-0.3.2 test/syntax/ruby/test_2.0.0.rb
regexp_parser-0.3.1 test/syntax/ruby/test_2.0.0.rb
regexp_parser-0.3.0 test/syntax/ruby/test_2.0.0.rb
regexp_parser-0.2.1 test/syntax/ruby/test_2.0.0.rb
regexp_parser-0.2.0 test/syntax/ruby/test_2.0.0.rb