Add shell script in testsuite/compiler/canonical for replicating known issues

Ideally this is integrated into proper test suite, but that's too much overhead for now
This commit is contained in:
John J. Camilleri
2021-06-30 12:41:56 +02:00
parent 0a70eca6e2
commit 0f5be0bbaa
21 changed files with 1779 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
#!/usr/bin/env sh
# https://github.com/GrammaticalFramework/gf-core/issues/100
stack run -- --batch --output-format=canonical_gf PhrasebookBul.gf
stack run -- --batch canonical/PhrasebookBul.gf
# https://github.com/GrammaticalFramework/gf-core/issues/101
stack run -- --batch --output-format=canonical_gf PhrasebookGer.gf
for s in c2 objCtrl; do
grep VRead --after-context=216 canonical/PhrasebookGer.gf | grep "$s" > /dev/null
if [ $? -ne 1 ]; then
echo "$s found"
exit 1
fi
done
# https://github.com/GrammaticalFramework/gf-core/issues/102
stack run -- --batch --output-format=canonical_gf FoodsFin.gf
diff canonical/FoodsFin.gf ./FoodsFin.gf.gold
if [ $? -ne 0 ]; then
echo "Compiled grammar doesn't match gold version"
exit 1
fi