Sha256: 9ca2a58956d709654847918088c9837a70ece7514ba454c863899f863e540ee5
Contents?: true
Size: 533 Bytes
Versions: 7
Compression:
Stored size: 533 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
7 entries across 7 versions & 1 rubygems