diff options
Diffstat (limited to 'tests/factors/setup.sh')
-rwxr-xr-x | tests/factors/setup.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/factors/setup.sh b/tests/factors/setup.sh new file mode 100755 index 0000000..7e32b3a --- /dev/null +++ b/tests/factors/setup.sh @@ -0,0 +1,25 @@ +#!/bin/bash -x + +##################################################################### +# AUTHOR: pedrodiascoelho +##################################################################### + +# Exit on error +set -e + +# Test code goes here +test -f $MRT_MODELS/factors/model.npz || exit 1 +test -f $MRT_MODELS/factors/model.npz.decoder.yml || exit 1 +test -f $MRT_MODELS/factors/vocab.en.fsv || exit 1 +test -f $MRT_MODELS/factors/vocab.de.fsv || exit 1 + +test -f $MRT_DATA/europarl.de-en/toy.bpe.en || exit 1 +test -f $MRT_DATA/europarl.de-en/toy.bpe.de || exit 1 + +test -s toy.bpe.fact.en || cat $MRT_DATA/europarl.de-en/toy.bpe.en | \ + sed 's/\(\s\|$\)/|s0 /g;s/@@|s0/|s1/g;s/\s*$//' > toy.bpe.fact.en +test -s toy.bpe.fact.de || cat $MRT_DATA/europarl.de-en/toy.bpe.en | \ + sed 's/\(\s\|$\)/|s0 /g;s/@@|s0/|s1/g;s/\s*$//' > toy.bpe.fact.de + +# Exit with success code +exit 0 |