Sha256: 4dfb5522d46ab59ca38d7d226544c432a1bc407dd3170e4e358485bfb38819d1

Contents?: true

Size: 823 Bytes

Versions: 7

Compression:

Stored size: 823 Bytes

Contents

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

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

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

  tests = {
    :implements => {
      :property => [
        UnicodeProperty::Script_7_0 + UnicodeProperty::Age_V220
      ].flatten,

      :nonproperty => [
        UnicodeProperty::Script_7_0 + UnicodeProperty::Age_V220
      ].flatten,
    },

    :excludes => {
    },
  }

  tests.each do |method, types|
    types.each do |type, tokens|
      tokens.each do |token|
        define_method "test_syntax_ruby_v220_#{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.2.0.rb
regexp_parser-0.3.3 test/syntax/ruby/test_2.2.0.rb
regexp_parser-0.3.2 test/syntax/ruby/test_2.2.0.rb
regexp_parser-0.3.1 test/syntax/ruby/test_2.2.0.rb
regexp_parser-0.3.0 test/syntax/ruby/test_2.2.0.rb
regexp_parser-0.2.1 test/syntax/ruby/test_2.2.0.rb
regexp_parser-0.2.0 test/syntax/ruby/test_2.2.0.rb