

set -ex



test -f $PREFIX/lib/libsentencepiece.so
test ! -f $PREFIX/lib/libsentencepiece.a
test -f $PREFIX/lib/libsentencepiece_train.so
test ! -f $PREFIX/lib/libsentencepiece_train.a
test -f $PREFIX/include//sentencepiece_processor.h || (echo "sentencepiece_processor.h not found" && exit 1)
test -f $PREFIX/include//sentencepiece_trainer.h || (echo "sentencepiece_trainer.h not found" && exit 1)
pkg-config --print-errors --exact-version "0.2.0" sentencepiece
./test_sentencepiece.sh
exit 0
