diff options
Diffstat (limited to 'test/scanners/ruby/regexp.in.rb')
-rw-r--r-- | test/scanners/ruby/regexp.in.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/test/scanners/ruby/regexp.in.rb b/test/scanners/ruby/regexp.in.rb index 956e6b8..e10e7a8 100644 --- a/test/scanners/ruby/regexp.in.rb +++ b/test/scanners/ruby/regexp.in.rb @@ -2,4 +2,17 @@ some_string.to_i /\s+/ some_string.split / +/ this is a regexp after a division / some_string.split / + / this one, too / -some_string.split /- / # and this one is a regexp without division
\ No newline at end of file +some_string.split /- / # and this one is a regexp without division + +it "allows substitution to interact with other Regexp constructs" do + str = "foo)|(bar" + /(#{str})/.should == /(foo)|(bar)/ + + str = "a" + /[#{str}-z]/.should == /[a-z]/ + + not_compliant_on(:ruby) do + str = "J" + re = /\c#{str}/.should == /\cJ/ + end +end
\ No newline at end of file |