Sha256: 485a2f107e1799f6ba96822aeaf59563ea395932af7f89ee9c71e55284885c62

Contents?: true

Size: 459 Bytes

Versions: 7

Compression:

Stored size: 459 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

7 entries across 7 versions & 1 rubygems

Version Path
regexp_parser-0.3.4 test/parser/test_keep.rb
regexp_parser-0.3.3 test/parser/test_keep.rb
regexp_parser-0.3.2 test/parser/test_keep.rb
regexp_parser-0.3.1 test/parser/test_keep.rb
regexp_parser-0.3.0 test/parser/test_keep.rb
regexp_parser-0.2.1 test/parser/test_keep.rb
regexp_parser-0.2.0 test/parser/test_keep.rb