@@ -291,6 +291,12 @@ def test_grep
291
291
assert_equal ( "you can't search me!" , match [ "gitsearch1:scott/newfile" ] . first [ 1 ] )
292
292
assert_equal ( 1 , match . size )
293
293
294
+ match = @lib . grep ( 'search' , :object => 'gitsearch1' , :path_limiter => [ 'scott/new*' , 'scott/text.*' ] )
295
+ assert_equal ( "you can't search me!" , match [ "gitsearch1:scott/newfile" ] . first [ 1 ] )
296
+ assert_equal ( 'to search one' , match [ 'gitsearch1:scott/text.txt' ] . assoc ( 6 ) [ 1 ] )
297
+ assert_equal ( 2 , match [ 'gitsearch1:scott/text.txt' ] . size )
298
+ assert_equal ( 2 , match . size )
299
+
294
300
match = @lib . grep ( 'SEARCH' , :object => 'gitsearch1' )
295
301
assert_equal ( 0 , match . size )
296
302
@@ -302,6 +308,11 @@ def test_grep
302
308
assert_equal ( 6 , match [ 'gitsearch1:scott/text.txt' ] . size )
303
309
assert_equal ( 2 , match . size )
304
310
311
+ match = @lib . grep ( "you can't search me!|nothing!" , :object => 'gitsearch1' , :extended_regexp => true )
312
+ assert_equal ( "you can't search me!" , match [ "gitsearch1:scott/newfile" ] . first [ 1 ] )
313
+ assert_equal ( "nothing!" , match [ "gitsearch1:scott/text.txt" ] . first [ 1 ] )
314
+ assert_equal ( 2 , match . size )
315
+
305
316
match = @lib . grep ( 'Grep' , :object => 'grep_colon_numbers' )
306
317
assert_equal ( "Grep regex doesn't like this:4342: because it is bad" , match [ 'grep_colon_numbers:colon_numbers.txt' ] . first [ 1 ] )
307
318
assert_equal ( 1 , match . size )
0 commit comments