Sha256: d2eecc1e2a24b7a8789e0bc8a8b7216765c93adfae9858c24c901510be56b2e5
Contents?: true
Size: 772 Bytes
Versions: 5
Compression:
Stored size: 772 Bytes
Contents
require File.expand_path("../../../helpers", __FILE__) class TestSyntaxV1_9_1 < Test::Unit::TestCase include Regexp::Syntax::Token def setup @syntax = Regexp::Syntax.new 'ruby/1.9.1' end tests = { implements: { escape: [ Escape::Hex + Escape::Octal + Escape::Unicode ].flatten, type: [ CharacterType::Hex ].flatten, quantifier: [ Quantifier::Greedy + Quantifier::Reluctant + Quantifier::Possessive ].flatten, }, } tests.each do |method, types| types.each do |type, tokens| tokens.each do |token| define_method "test_syntax_V1_9_1_#{method}_#{type}_#{token}" do assert_equal true, @syntax.implements?(type, token) end end end end end
Version data entries
5 entries across 5 versions & 2 rubygems