Sha256: b9a6cf9e1c7c3d508cbc4125e780975f06f2de8ea1963e67eb2057be96a6a23b

Contents?: true

Size: 447 Bytes

Versions: 25

Compression:

Stored size: 447 Bytes

Contents

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

class ParserKeep < Test::Unit::TestCase

  def test_parse_keep
    regexp = /ab\Kcd/
    root   = RP.parse(regexp)

    assert_equal Keep::Mark, root[1].class
    assert_equal '\\K',      root[1].text
  end

  def test_parse_keep_nested
    regexp = /(a\\\Kb)/
    root   = RP.parse(regexp)

    assert_equal Keep::Mark, root[0][2].class
    assert_equal '\\K',      root[0][2].text
  end

end

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
tdiary-5.0.13 vendor/bundle/gems/regexp_parser-1.3.0/test/parser/test_keep.rb
regexp_parser-1.4.0 test/parser/test_keep.rb
tdiary-5.0.12.1 vendor/bundle/gems/regexp_parser-1.3.0/test/parser/test_keep.rb
tdiary-5.0.11 vendor/bundle/gems/regexp_parser-1.3.0/test/parser/test_keep.rb
regexp_parser-1.3.0 test/parser/test_keep.rb
regexp_parser-1.2.0 test/parser/test_keep.rb
regexp_parser-1.1.0 test/parser/test_keep.rb
regexp_parser-1.0.0 test/parser/test_keep.rb
regexp_parser-0.5.0 test/parser/test_keep.rb
regexp_parser-0.4.13 test/parser/test_keep.rb
regexp_parser-0.4.12 test/parser/test_keep.rb
regexp_parser-0.4.11 test/parser/test_keep.rb
regexp_parser-0.4.10 test/parser/test_keep.rb
regexp_parser-0.4.9 test/parser/test_keep.rb
regexp_parser-0.4.8 test/parser/test_keep.rb
regexp_parser-0.4.7 test/parser/test_keep.rb
regexp_parser-0.4.6 test/parser/test_keep.rb
regexp_parser-0.4.5 test/parser/test_keep.rb
regexp_parser-0.4.4 test/parser/test_keep.rb
regexp_parser-0.4.3 test/parser/test_keep.rb