2020-01-13 20:11:59 +01:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
|
|
|
usage=$(./iast -h)
|
|
|
|
test -n $(echo "$usage" | grep "iast [flags and text arguments in any order]")
|
|
|
|
|
|
|
|
version=$(./iast -v)
|
2021-03-11 20:23:07 +01:00
|
|
|
test "$version" = "iast v2.0.0"
|
2020-01-13 20:11:59 +01:00
|
|
|
|
|
|
|
./iast -f tests/texts/bhagavadgita-1.txt |
|
|
|
|
./iast -r -f - >/tmp/iast-bhagavadgita-1.txt.out
|
|
|
|
./iast -f tests/texts/mandukya-upanishad.txt |
|
|
|
|
./iast -r -f - >/tmp/iast-mandukya-upanishad.txt.out
|
2021-02-19 13:27:40 +01:00
|
|
|
./iast -f tests/texts/rg-01001.txt |
|
|
|
|
./iast -r -f - >/tmp/rg-01001.txt.out
|
2020-01-13 20:11:59 +01:00
|
|
|
|
|
|
|
expected=$(sha1sum tests/texts/bhagavadgita-1.txt | head -c40)
|
|
|
|
computed=$(sha1sum /tmp/iast-bhagavadgita-1.txt.out | head -c40)
|
|
|
|
test "$expected" = "$computed"
|
|
|
|
|
|
|
|
expected=$(sha1sum tests/texts/mandukya-upanishad.txt | head -c40)
|
|
|
|
computed=$(sha1sum /tmp/iast-mandukya-upanishad.txt.out | head -c40)
|
|
|
|
test "$expected" = "$computed"
|
|
|
|
|
2021-02-19 13:27:40 +01:00
|
|
|
expected=$(sha1sum tests/texts/rg-01001.txt | head -c40)
|
|
|
|
computed=$(sha1sum /tmp/rg-01001.txt.out | head -c40)
|
|
|
|
test "$expected" = "$computed"
|
|
|
|
|
2020-10-27 15:35:56 +01:00
|
|
|
printf "\033[32mpassed\033[0m\n"
|