Skip to content

Commit

Permalink
added tests.sh to run a few standardized tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Hiller committed Apr 1, 2017
1 parent ff693bf commit 6cf8042
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 4 deletions.
2 changes: 1 addition & 1 deletion extra/samples/sample4.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
>referenceExon
aaCCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCC
>query
cttccccatttttatctcatagac------------------------------------------------------------------------------------------CCC------------
cttccccatttttatctcatagac------------------------------------------------------------------------CCC------------------------------
2 changes: 1 addition & 1 deletion extra/samples/sample5.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
>referenceExon
aaCCTAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCC
aaCCTAAACCCAAACCCAAACCC
>query
cttccccatttttatctcatagacCCT
4 changes: 2 additions & 2 deletions extra/samples/sample5.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
>referenceExon
aaCCTAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCCAAACCC
aaCCTAAACCCAAACCCAAACCC
>query
cttccccatttttatctcatagacCCT------------------------------------------------------------------------------------------------------
cttccccatttttatctcatagacCCT------------------
25 changes: 25 additions & 0 deletions tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

if [ $# -ne 1 ]; then
echo "Usage: $0 ./cesar"
exit 1
fi

set -e

HERE=$(dirname $0)
cesar=$1

# check if cesar successfully returns the test samples.

echo "Checking for correct behaviour."
for f in $(find $HERE/extra/samples -name '*.in'); do
diff -q <($cesar $f) $HERE/extra/samples/$(basename $f .in).out
if [ $? -ne 0 ]; then
echo "$f... NOK"
exit 1
else
echo "$f... OK"
fi
done
exit 0

0 comments on commit 6cf8042

Please sign in to comment.