Sha256: d2eecc1e2a24b7a8789e0bc8a8b7216765c93adfae9858c24c901510be56b2e5

Contents?: true

Size: 772 Bytes

Versions: 5

Compression:

Stored size: 772 Bytes

Contents

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

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

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

  tests = {
    implements: {
      escape: [
        Escape::Hex + Escape::Octal + Escape::Unicode
      ].flatten,

      type: [
        CharacterType::Hex
      ].flatten,

      quantifier: [
        Quantifier::Greedy + Quantifier::Reluctant + Quantifier::Possessive
      ].flatten,
    },
  }

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

end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
tdiary-5.0.13 vendor/bundle/gems/regexp_parser-1.3.0/test/syntax/versions/test_1.9.1.rb
regexp_parser-1.4.0 test/syntax/versions/test_1.9.1.rb
tdiary-5.0.12.1 vendor/bundle/gems/regexp_parser-1.3.0/test/syntax/versions/test_1.9.1.rb
tdiary-5.0.11 vendor/bundle/gems/regexp_parser-1.3.0/test/syntax/versions/test_1.9.1.rb
regexp_parser-1.3.0 test/syntax/versions/test_1.9.1.rb