3 # Runs all tests in this directory.
5 # Copyright (C) 2009-2013 Simon Ruderich
7 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
22 for file in *.test; do
23 # Create temporary directory.
26 # Run the test file in sh and zsh and get its output.
27 sh $file > $file.out.sh 2>&1
28 zsh $file > $file.out.zsh 2>&1
30 # Check if the output matches the expected one. If not abort with exit
32 diff -u $file.out $file.out.sh || exit 1
33 diff -u $file.out $file.out.zsh || exit 1
35 # Remove temporary directory.
39 # Remove all temporary files.