Sha256: d663876e80829d449eb10224f439f3833b82bc4f8a0addf54dd3c8d39c13f2b4
Contents?: true
Size: 856 Bytes
Versions: 4
Compression:
Stored size: 856 Bytes
Contents
# frozen_string_literal: true mutations = { [:regexp_digit_type, '/\d/'] => [:regexp_nondigit_type, '/\D/'], [:regexp_hex_type, '/\h/'] => [:regexp_nonhex_type, '/\H/'], [:regexp_space_type, '/\s/'] => [:regexp_nonspace_type, '/\S/'], [:regexp_word_boundary_anchor, '/\b/'] => [:regexp_nonword_boundary_anchor, '/\B/'], [:regexp_word_type, '/\w/'] => [:regexp_nonword_type, '/\W/'], [:regexp_xgrapheme_type, '/\X/'] => [:regexp_linebreak_type, '/\R/'] } mutations = mutations.merge(mutations.invert) mutations.each do |(source_type, source_mutation), (_, regexp_mutation)| Mutant::Meta::Example.add :regexp, source_type do source(source_mutation) singleton_mutations regexp_mutations mutation(regexp_mutation) end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
mutant-0.8.24 | meta/regexp/character_types.rb |
mutant-0.8.23 | meta/regexp/character_types.rb |
mutant-0.8.22 | meta/regexp/character_types.rb |
mutant-0.8.21 | meta/regexp/character_types.rb |