Class ConstRegexpTest
In: lib/const_regexp.rb
Parent: Test::Unit::TestCase

Methods

Included Modules

ConstRegexp

Public Instance methods

Tests

[Source]

# File lib/const_regexp.rb, line 40
  def test_rb_regexp
    assert_match(RB_REGEXP, '//')
    assert_no_match(RB_REGEXP, '')
    assert_match(RB_REGEXP, '/\//')
    assert_match(RB_REGEXP, '/\/\//')
    assert_match(RB_REGEXP, '/reg\/e/')
    assert_no_match(RB_REGEXP, '/\\/')
    assert_match(RB_REGEXP, '/\\\\/')
    assert_match(RB_REGEXP, '/\e/')
    assert_no_match(RB_REGEXP, '/\/')
  end

[Validate]