]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - tests/run.sh
tests/run.sh: Don't require diff -N.
[config/dotfiles.git] / tests / run.sh
index 805b450e1410f67ef7f48800b5b8aa6b1a39177f..65dad840bc9c2500718ba8ddf8bb1bacd0dfb71f 100755 (executable)
@@ -5,17 +5,22 @@
 
 # Get all test files.
 for file in *.test; do
+    # Create temporary directory.
+    mkdir -p tmp
+
     # Run the test file in sh and zsh and get its output.
     sh $file  > $file.out.sh  2>&1
     zsh $file > $file.out.zsh 2>&1
 
     # Check if the output matches the expected one. If not abort with exit
     # code 1.
-    diff -u -N $file.out $file.out.sh  || exit 1
-    diff -u -N $file.out $file.out.zsh || exit 1
+    diff -u $file.out $file.out.sh  || exit 1
+    diff -u $file.out $file.out.zsh || exit 1
+
+    # Remove temporary directory.
+    rm -rf tmp
 done
 
 # Remove all temporary files.
-rm -rf tmp
 rm *.out.sh
 rm *.out.zsh