Sha256: 84a6ae1f6e63229d326b3f23eccf9d90dc474990dc3964ed31e1b0acd8fd00d1
Contents?: true
Size: 588 Bytes
Versions: 16
Compression:
Stored size: 588 Bytes
Contents
require 'facets/matchdata/matchset' require 'test/unit' class Test_MatchData_Matchset < Test::Unit::TestCase def test_matchtree_01 md = /(bb)(cc(dd))(ee)/.match "XXaabbccddeeffXX" assert_equal( [["bb"], ["cc", ["dd"]], ["ee"]] , md.matchtree ) end def test_matchtree_02 md = /(bb)c(c(dd))(ee)/.match "XXaabbccddeeffXX" assert_equal( [["bb"], "c", ["c", ["dd"]], ["ee"]] , md.matchtree ) end def test_matchset md = /(bb)(cc(dd))(ee)/.match "XXaabbccddeeffXX" assert_equal( ["XXaa", [["bb"], ["cc", ["dd"]], ["ee"]], "ffXX"] , md.matchset ) end end
Version data entries
16 entries across 16 versions & 1 rubygems