Skip to content

Commit

Permalink
add bash-based test
Browse files Browse the repository at this point in the history
  • Loading branch information
vmikk committed Oct 16, 2024
1 parent c204667 commit 3c5dead
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/test2_binary.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash

set -euo pipefail

# Test basic usage
function test_basic_usage {
result=$(../seqhasher test2.fasta -)
expected=$(cat <<EOF
>test2.fasta;e2512172abf8cc9f67fdd49eb6cacf2df71bbad3;seq1
AAAA
>test2.fasta;65c89f59d38cdbf90dfaf0b0a6884829df8396b0;seq2
ACTG
>test2.fasta;e2512172abf8cc9f67fdd49eb6cacf2df71bbad3;seq3
AAAA
EOF
)
if [[ "$result" != "$expected" ]]; then
echo "Basic usage test failed"
exit 1
fi
}

test_basic_usage

0 comments on commit 3c5dead

Please sign in to comment.