tests: Use 'NONE' to denote no highlighting
'none' is a valid highlighting type. Since by convention styles are all lowercase, 'NONE' shouldn't conflict with anything. Closes #289.
This commit is contained in:
		
							parent
							
								
									c346f6eb6f
								
							
						
					
					
						commit
						4da9889d15
					
				|  | @ -30,5 +30,5 @@ | ||||||
| BUFFER='echo "foo ( bar"' | BUFFER='echo "foo ( bar"' | ||||||
| 
 | 
 | ||||||
| expected_region_highlight=( | expected_region_highlight=( | ||||||
| "1  16 none" # We expect the brackets highlighter to do nothing | "1  16 NONE" # We expect the brackets highlighter to do nothing | ||||||
| ) | ) | ||||||
|  |  | ||||||
|  | @ -101,6 +101,7 @@ run_test_internal() { | ||||||
|   for ((i=1; i<=${#expected_region_highlight}; i++)); do |   for ((i=1; i<=${#expected_region_highlight}; i++)); do | ||||||
|     local todo= |     local todo= | ||||||
|     highlight_zone=${(z)expected_region_highlight[$i]} |     highlight_zone=${(z)expected_region_highlight[$i]} | ||||||
|  |     [[ $highlight_zone[3] == NONE ]] && highlight_zone[3]= | ||||||
|     [[ -n "$highlight_zone[4]" ]] && todo=" # TODO $highlight_zone[4]" |     [[ -n "$highlight_zone[4]" ]] && todo=" # TODO $highlight_zone[4]" | ||||||
|     for j in {$highlight_zone[1]..$highlight_zone[2]}; do |     for j in {$highlight_zone[1]..$highlight_zone[2]}; do | ||||||
|       if [[ "$observed_result[$j]" != "$ZSH_HIGHLIGHT_STYLES[$highlight_zone[3]]" ]]; then |       if [[ "$observed_result[$j]" != "$ZSH_HIGHLIGHT_STYLES[$highlight_zone[3]]" ]]; then | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue