From a62ee369a1cd9e141518c2d145a5e6dfc5362d9f Mon Sep 17 00:00:00 2001 From: knu Date: Fri, 5 Jul 2013 07:07:28 +0000 Subject: * test/ruby/test_regexp.rb (TestRegexp#test_options_in_look_behind) (TestRegexp#assert_match_at): Add tests for another problem fixed in Onigmo 5.13.5. Previously Onigmo did not allow option enclosures in look-behind, which makes it impossible to interpolate a regexp into another in the middle of a look-behind pattern. cf. https://github.com/k-takata/Onigmo/pull/17 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_regexp.rb | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb index f13a900634..2bfbd9dff9 100644 --- a/test/ruby/test_regexp.rb +++ b/test/ruby/test_regexp.rb @@ -944,6 +944,38 @@ class TestRegexp < Test::Unit::TestCase assert_match_each(/\A((?x)|(?y))(?()y|x)\z/, conds, bug8583) end + def test_options_in_look_behind + assert_nothing_raised { + assert_match_at(/(?<=(?i)ab)cd/, "ABcd", [[2,4]]) + assert_match_at(/(?<=(?i:ab))cd/, "ABcd", [[2,4]]) + assert_match_at(/(?