mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-03 08:12:51 -06:00
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:
23
testsuite/compiler/canonical/run.sh
Executable file
23
testsuite/compiler/canonical/run.sh
Executable 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
|
||||
Reference in New Issue
Block a user