@@ -249,7 +249,7 @@ def test_complete
249249
250250 @driver . stores = [ store ]
251251
252- assert_equal %w[ Foo Foo::Bar ] , @driver . complete ( 'F' )
252+ assert_equal %w[ Foo ] , @driver . complete ( 'F' )
253253 assert_equal %w[ Foo::Bar ] , @driver . complete ( 'Foo::B' )
254254
255255 assert_equal %w[ Foo#Bar ] , @driver . complete ( 'Foo#' ) , 'Foo#'
@@ -269,7 +269,7 @@ def test_complete_ancestor
269269 def test_complete_classes
270270 util_store
271271
272- assert_equal %w[ Foo Foo::Bar Foo::Baz ] , @driver . complete ( 'F' )
272+ assert_equal %w[ Foo ] , @driver . complete ( 'F' )
273273 assert_equal %w[ Foo:: Foo::Bar Foo::Baz ] , @driver . complete ( 'Foo::' )
274274 assert_equal %w[ Foo::Bar Foo::Baz ] , @driver . complete ( 'Foo::B' )
275275 end
@@ -278,7 +278,8 @@ def test_complete_multistore
278278 util_multi_store
279279
280280 assert_equal %w[ Bar ] , @driver . complete ( 'B' )
281- assert_equal %w[ Foo Foo::Bar Foo::Baz ] , @driver . complete ( 'F' )
281+ assert_equal %w[ Foo ] , @driver . complete ( 'F' )
282+ assert_equal %w[ Foo::Bar Foo::Baz ] , @driver . complete ( 'Foo::B' )
282283 end
283284
284285 def test_display
@@ -603,6 +604,24 @@ def test_list_methods_matching
603604 @driver . list_methods_matching ( 'Foo::Bar.' )
604605 end
605606
607+ def test_list_methods_matching_regexp
608+ util_store
609+
610+ index = RDoc ::AnyMethod . new nil , '[]'
611+ @cFoo . add_method index
612+ @store . save_method @cFoo , index
613+
614+ c_index = RDoc ::AnyMethod . new nil , '[]'
615+ c_index . singleton = true
616+ @cFoo . add_method c_index
617+ @store . save_method @cFoo , c_index
618+
619+ @store . save_cache
620+
621+ assert_equal %w[ Foo#[] ] , @driver . list_methods_matching ( 'Foo#[]' )
622+ assert_equal %w[ Foo::[] ] , @driver . list_methods_matching ( 'Foo::[]' )
623+ end
624+
606625 def test_load_method
607626 util_store
608627
0 commit comments