summaryrefslogtreecommitdiff
path: root/testsuite/compiler/canonical/run.sh
blob: b9cc7e25b10e4a3ffebffeaaf926c1d2620cca3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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