#!/bin/bash
#
# This script downloads test data, and checks that flower produces consistent
# output.
get_data(){
	wget http://malde.org/~ketil/test.sff
	wget http://malde.org/~ketil/test.md5
}

cabal configure
cabal build

get_data

# run tests:

dist/build/flower/flower -f=test.fasta -q=test.qual -Q=test.fastq -T=test.txt test.sff
md5sum test.{fasta,qual,fastq,txt} > new.md5

diff -u test.md5 new.md5 && echo "Test succeessful" || echo "TEST FAILED"


