Skip to content

Commit

Permalink
chore: print test commands (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
kjappelbaum authored Dec 12, 2022
1 parent d8f952a commit 3355d35
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions tests/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
# Exit immediately if a command exits with a non-zero status.
set -e

function check_changes
{
function check_changes {
#diff=`git diff-index --quiet HEAD --`
diff=`git diff --no-index $1 $2`
diff=$(git diff --no-index $1 $2)
rm $1
if [ -n "$diff" ]; then
echo "### Changes detected:"
Expand All @@ -15,17 +14,27 @@ function check_changes
fi
}

echo "Testing network -xyz ZIF-67_opt.cif"
network -xyz ZIF-67_opt.cif
check_changes ZIF-67_opt.xyz ZIF-67_opt_ref.xyz

echo "Testing network -ha -res -allowAdjustCoordsAndCell EDI.cssr"
network -ha -res -allowAdjustCoordsAndCell EDI.cssr
check_changes EDI.res EDI_ref.res

echo "Testing network -ha -chan 1.5 EDI.cssr"
network -ha -chan 1.5 EDI.cssr
check_changes EDI.chan EDI_ref.chan

echo "Testing network -ha -sa 1.2 1.2 2000 EDI.cssr"
network -ha -sa 1.2 1.2 2000 EDI.cssr
check_changes EDI.sa EDI_ref.sa

echo "Testing network -ha -vol 1.2 1.2 50000 EDI.cssr"
network -ha -vol 1.2 1.2 50000 EDI.cssr
check_changes EDI.vol EDI_ref.vol

echo "Testing network -ha -psd 1.2 1.2 50000 EDI.cssr"
network -ha -psd 1.2 1.2 50000 EDI.cssr
check_changes EDI.psd_histo EDI_ref.psd_histo

Expand Down

0 comments on commit 3355d35

Please sign in to comment.