diff --git a/ChangeLog b/ChangeLog index 2f7eb8deb0..b1ec5e7ddd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sun May 1 23:51:54 2016 NAKAMURA Usaku + + * test/lib/test/unit.rb (Options#non_options): fixed wrong regexp. + if both positives and negatives were specified, postives had to + be spcicifed from the beginning. + Sun May 1 21:00:07 2016 NAKAMURA Usaku * win32/win32.c: drop Win2K support. diff --git a/test/lib/test/unit.rb b/test/lib/test/unit.rb index c5dd29b0cf..d34e11afa7 100644 --- a/test/lib/test/unit.rb +++ b/test/lib/test/unit.rb @@ -110,7 +110,7 @@ module Test end unless negative.empty? negative = Regexp.union(*negative.map! {|s| s[neg_pat, 1]}) - filter = /\A(?!.*#{negative})#{filter}/ + filter = /\A(?=.*#{filter})(?!.*#{negative})/ end if Regexp === filter # bypass conversion in minitest