tests: exit non-zero upon failure
This commit is contained in:
		
							parent
							
								
									51aed8a765
								
							
						
					
					
						commit
						13a8db1d71
					
				|  | @ -49,6 +49,7 @@ | ||||||
| 
 | 
 | ||||||
| local -a errors highlight_zone | local -a errors highlight_zone | ||||||
| local -A observed_result | local -A observed_result | ||||||
|  | integer something_failed=0 | ||||||
| 
 | 
 | ||||||
| # Load the main script. | # Load the main script. | ||||||
| . ${0:h:h}/zsh-syntax-highlighting.zsh | . ${0:h:h}/zsh-syntax-highlighting.zsh | ||||||
|  | @ -107,9 +108,12 @@ for data_file in ${0:h:h}/highlighters/$1/test-data/*; do | ||||||
|     echo "OK" |     echo "OK" | ||||||
|   else |   else | ||||||
|     echo "KO" |     echo "KO" | ||||||
|  |     (( something_failed=1 )) | ||||||
|     for error in $errors; do |     for error in $errors; do | ||||||
|       echo "   - $error" |       echo "   - $error" | ||||||
|     done |     done | ||||||
|   fi |   fi | ||||||
| 
 | 
 | ||||||
| done | done | ||||||
|  | 
 | ||||||
|  | exit $something_failed | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue