Sha256: dc46b053de0ab286e56f20e1a5370858086d1ae715460a001755bd963e57041c

Contents?: true

Size: 895 Bytes

Versions: 51

Compression:

Stored size: 895 Bytes

Contents

require 'spec_helper'

RSpec.describe('Anchor parsing') do
  include_examples 'parse', /^a/,   0 =>  [:anchor,   :bol,               Anchor::BOL]
  include_examples 'parse', /a$/,   1 =>  [:anchor,   :eol,               Anchor::EOL]

  include_examples 'parse', /\Aa/,  0 =>  [:anchor,   :bos,               Anchor::BOS]
  include_examples 'parse', /a\z/,  1 =>  [:anchor,   :eos,               Anchor::EOS]
  include_examples 'parse', /a\Z/,  1 =>  [:anchor,   :eos_ob_eol,        Anchor::EOSobEOL]

  include_examples 'parse', /a\b/,  1 =>  [:anchor,   :word_boundary,     Anchor::WordBoundary]
  include_examples 'parse', /a\B/,  1 =>  [:anchor,   :nonword_boundary,  Anchor::NonWordBoundary]

  include_examples 'parse', /a\G/,  1 =>  [:anchor,   :match_start,       Anchor::MatchStart]

  include_examples 'parse', /\\A/,  0 =>  [:escape,   :backslash,         EscapeSequence::Literal]
end

Version data entries

51 entries across 38 versions & 10 rubygems

Version Path
plaid-14.13.0 vendor/bundle/ruby/3.0.0/gems/regexp_parser-1.8.0/spec/parser/anchors_spec.rb
plaid-14.12.1 vendor/bundle/ruby/3.0.0/gems/regexp_parser-1.8.0/spec/parser/anchors_spec.rb
plaid-14.12.0 vendor/bundle/ruby/2.6.0/gems/regexp_parser-1.8.0/spec/parser/anchors_spec.rb
plaid-14.11.1 vendor/bundle/ruby/2.6.0/gems/regexp_parser-1.8.0/spec/parser/anchors_spec.rb
phillipug-foodie-0.1.0 .vendor/ruby/3.0.0/gems/regexp_parser-2.2.0/spec/parser/anchors_spec.rb
plaid-14.10.0 vendor/bundle/ruby/2.6.0/gems/regexp_parser-1.8.0/spec/parser/anchors_spec.rb
regexp_parser-2.2.0 spec/parser/anchors_spec.rb
tdiary-5.2.0 vendor/bundle/ruby/2.7.0/gems/regexp_parser-2.1.1/spec/parser/anchors_spec.rb
tdiary-5.2.0 vendor/bundle/ruby/3.0.0/gems/regexp_parser-2.1.1/spec/parser/anchors_spec.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/regexp_parser-2.1.1/spec/parser/anchors_spec.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/regexp_parser-2.1.1/spec/parser/anchors_spec.rb
plaid-14.7.0 vendor/bundle/ruby/2.6.0/gems/regexp_parser-1.8.0/spec/parser/anchors_spec.rb
tdiary-5.1.7 vendor/bundle/ruby/2.7.0/gems/regexp_parser-2.1.1/spec/parser/anchors_spec.rb
tdiary-5.1.7 vendor/bundle/ruby/3.0.0/gems/regexp_parser-2.1.1/spec/parser/anchors_spec.rb
rails_mini_profiler-0.2.0 vendor/bundle/ruby/3.0.0/gems/regexp_parser-2.1.1/spec/parser/anchors_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/regexp_parser-2.1.1/spec/parser/anchors_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/2.7.0/gems/regexp_parser-2.1.1/spec/parser/anchors_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/regexp_parser-2.0.3/spec/parser/anchors_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/regexp_parser-1.8.2/spec/parser/anchors_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/3.0.0/gems/regexp_parser-2.1.1/spec/parser/anchors_spec.rb