Sha256: 2379658d4fdcd56c012c669e09dd0cad4d4101b5559f15a6ecf2c6356abd2ac3

Contents?: true

Size: 617 Bytes

Versions: 1

Compression:

Stored size: 617 Bytes

Contents

require 'spec_helper'

RSpec.describe(Regexp::Syntax::V1_9_1) do
  let(:syntax) { Regexp::Syntax.new('ruby/1.9.1') }

  tests = {
    implements: {
      escape: T::Escape::Hex + T::Escape::Octal + T::Escape::Unicode,
      type: T::CharacterType::Hex,
      quantifier: T::Quantifier::Greedy + T::Quantifier::Reluctant + T::Quantifier::Possessive
    }
  }

  tests.each do |method, types|
    types.each do |type, tokens|
      tokens.each do |token|
        specify("syntax_V1_9_1_#{method}_#{type}_#{token}") do
          expect(syntax.implements?(type, token)).to be true
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
regexp_parser-1.5.0 spec/syntax/versions/1.9.1_spec.rb