Sha256: ffb2932304f84f7c7745234febe2bde0042b4cf12caeafcb6413ce1a000ca73c

Contents?: true

Size: 515 Bytes

Versions: 25

Compression:

Stored size: 515 Bytes

Contents

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

class LexerKeep < Test::Unit::TestCase

  def test_lex_keep_token
    regexp = /ab\Kcd/
    tokens = RL.lex(regexp)

    assert_equal :keep, tokens[1].type
    assert_equal :mark, tokens[1].token
  end

  def test_lex_keep_nested
    regexp = /(a\Kb)|(c\\\Kd)ef/
    tokens = RL.lex(regexp)

    assert_equal :keep, tokens[2].type
    assert_equal :mark, tokens[2].token

    assert_equal :keep, tokens[9].type
    assert_equal :mark, tokens[9].token
  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/lexer/test_keep.rb
regexp_parser-1.4.0 test/lexer/test_keep.rb
tdiary-5.0.12.1 vendor/bundle/gems/regexp_parser-1.3.0/test/lexer/test_keep.rb
tdiary-5.0.11 vendor/bundle/gems/regexp_parser-1.3.0/test/lexer/test_keep.rb
regexp_parser-1.3.0 test/lexer/test_keep.rb
regexp_parser-1.2.0 test/lexer/test_keep.rb
regexp_parser-1.1.0 test/lexer/test_keep.rb
regexp_parser-1.0.0 test/lexer/test_keep.rb
regexp_parser-0.5.0 test/lexer/test_keep.rb
regexp_parser-0.4.13 test/lexer/test_keep.rb
regexp_parser-0.4.12 test/lexer/test_keep.rb
regexp_parser-0.4.11 test/lexer/test_keep.rb
regexp_parser-0.4.10 test/lexer/test_keep.rb
regexp_parser-0.4.9 test/lexer/test_keep.rb
regexp_parser-0.4.8 test/lexer/test_keep.rb
regexp_parser-0.4.7 test/lexer/test_keep.rb
regexp_parser-0.4.6 test/lexer/test_keep.rb
regexp_parser-0.4.5 test/lexer/test_keep.rb
regexp_parser-0.4.4 test/lexer/test_keep.rb
regexp_parser-0.4.3 test/lexer/test_keep.rb