Sha256: 8d7215369953403f4ce78389acfdcccdee2a37af40757ce31500551a7a932441

Contents?: true

Size: 731 Bytes

Versions: 4

Compression:

Stored size: 731 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_V220 + UnicodeProperty::Age_V220
      ].flatten,

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

  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 true, @syntax.implements?(type, token)
        end
      end
    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
regexp_parser-0.4.13 test/syntax/ruby/test_2.2.0.rb
regexp_parser-0.4.12 test/syntax/ruby/test_2.2.0.rb
regexp_parser-0.4.11 test/syntax/ruby/test_2.2.0.rb
regexp_parser-0.4.10 test/syntax/ruby/test_2.2.0.rb