Sha256: 29081fae7be140382b24baa1e2060087ee5686924e6d50265512908219e42e3e
Contents?: true
Size: 644 Bytes
Versions: 6
Compression:
Stored size: 644 Bytes
Contents
require 'spec_helper' describe 'EcmaReValidator::Lookbehind' do it 'should fail if regexp has a positive lookbehind' do re = '(?<=a)b' expect(EcmaReValidator.valid?(re)).to eql(false) end it 'should pass if regexp has an escaped positive lookbehind' do re = '\\(?<=a\\)b' expect(EcmaReValidator.valid?(re)).to eql(true) end it 'should fail if regexp has a negative lookbehind' do re = '(?<!a)b' expect(EcmaReValidator.valid?(re)).to eql(false) end it 'should pass if regexp has an escaped negative lookbehind' do re = '\\(?<!a\\)b' expect(EcmaReValidator.valid?(re)).to eql(true) end end
Version data entries
6 entries across 6 versions & 1 rubygems