# Runs all tests. # Get all test files. for file in *.test; do # Run the test file in zsh and sh and get its output. zsh $file &> $file.out.zsh sh $file &> $file.out.sh # Check if the output matches the expected one. If not abort with exit # code 1. diff -u $file.out $file.out.zsh if [[ $? -ne 0 ]]; then exit 1 fi diff -u $file.out $file.out.sh if [[ $? -ne 0 ]]; then exit 1 fi done # Remove all temporary files. rm -rf tmp rm *.out.zsh rm *.out.sh