Sha256: 51ad2aa243efee533e9aa9efca4eae90ea34e00f3ef8470de5a61a5f35324ef5

Contents?: true

Size: 801 Bytes

Versions: 9

Compression:

Stored size: 801 Bytes

Contents

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

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

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

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

      nonproperty: [
        UnicodeProperty::Age_V2_0_0
      ].flatten,
    },
    excludes: {
      property:    [:newline],
      nonproperty: [:newline],
    }
  }

  tests.each do |method, types|
    expected = method == :excludes ? false : true

    types.each do |type, tokens|
      tokens.each do |token|
        define_method "test_syntax_ruby_V2_0_0_#{method}_#{type}_#{token}" do
          assert_equal expected, @syntax.implements?(type, token)
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
tdiary-5.0.13 vendor/bundle/gems/regexp_parser-1.3.0/test/syntax/versions/test_2.0.0.rb
regexp_parser-1.4.0 test/syntax/versions/test_2.0.0.rb
tdiary-5.0.12.1 vendor/bundle/gems/regexp_parser-1.3.0/test/syntax/versions/test_2.0.0.rb
tdiary-5.0.11 vendor/bundle/gems/regexp_parser-1.3.0/test/syntax/versions/test_2.0.0.rb
regexp_parser-1.3.0 test/syntax/versions/test_2.0.0.rb
regexp_parser-1.2.0 test/syntax/versions/test_2.0.0.rb
regexp_parser-1.1.0 test/syntax/versions/test_2.0.0.rb
regexp_parser-1.0.0 test/syntax/versions/test_2.0.0.rb
regexp_parser-0.5.0 test/syntax/versions/test_2.0.0.rb