Add \h -> \H and \H -> \h mutations
This commit is contained in:
		
							parent
							
								
									1f1280090f
								
							
						
					
					
						commit
						91cd00eaae
					
				
					 4 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,3 @@
 | 
			
		|||
---
 | 
			
		||||
threshold: 16
 | 
			
		||||
total_score: 1312
 | 
			
		||||
total_score: 1303
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -41,7 +41,9 @@ module Mutant
 | 
			
		|||
          regexp_bol_anchor
 | 
			
		||||
          regexp_digit_type
 | 
			
		||||
          regexp_eol_anchor
 | 
			
		||||
          regexp_hex_type
 | 
			
		||||
          regexp_nondigit_type
 | 
			
		||||
          regexp_nonhex_type
 | 
			
		||||
          regexp_nonspace_type
 | 
			
		||||
          regexp_nonword_boundary_anchor
 | 
			
		||||
          regexp_nonword_type
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,6 +6,7 @@ module Mutant
 | 
			
		|||
        class CharacterType < Node
 | 
			
		||||
          map = {
 | 
			
		||||
            regexp_digit_type:           :regexp_nondigit_type,
 | 
			
		||||
            regexp_hex_type:             :regexp_nonhex_type,
 | 
			
		||||
            regexp_space_type:           :regexp_nonspace_type,
 | 
			
		||||
            regexp_word_boundary_anchor: :regexp_nonword_boundary_anchor,
 | 
			
		||||
            regexp_word_type:            :regexp_nonword_type
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,6 @@
 | 
			
		|||
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/']
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue