Sha256: 482efa1550f255df6b382ad5eddbb6422f80ff47225fb56335028860f57b359b

Contents?: true

Size: 587 Bytes

Versions: 5

Compression:

Stored size: 587 Bytes

Contents

require File.expand_path("../../helpers", __FILE__)

require File.expand_path("../ruby/test_all", __FILE__)

class TestSyntax < Test::Unit::TestCase

  def test_syntax_unknown_name
    assert_raise( Regexp::Syntax::UnknownSyntaxNameError ) {
      Regexp::Syntax.instantiate('ruby/1.0')
    }
  end

  def test_syntax_missing_spec
    assert_raise( Regexp::Syntax::MissingSyntaxSpecError ) {
      RL.scan('abc', 'ruby/1.6')
    }
  end

  def test_syntax_not_implemented
    assert_raise( Regexp::Syntax::NotImplementedError ) {
      RP.parse('\p{alpha}', 'ruby/1.8')
    }
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
regexp_parser-0.3.6 test/syntax/test_all.rb
regexp_parser-0.3.5 test/syntax/test_all.rb
regexp_parser-0.3.4 test/syntax/test_all.rb
regexp_parser-0.3.3 test/syntax/test_all.rb
regexp_parser-0.3.2 test/syntax/test_all.rb