Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
27 lines
638 B
Nix
27 lines
638 B
Nix
{
|
|
runCommand,
|
|
frog,
|
|
}:
|
|
|
|
runCommand "frog-test" { } ''
|
|
${frog}/bin/frog >$out <<EOF
|
|
Dit is een test
|
|
|
|
EOF
|
|
echo "Frog output:"
|
|
cat $out
|
|
|
|
expected () {
|
|
echo "Test expectation failed: $@"
|
|
exit 1
|
|
}
|
|
|
|
lines="$(wc -l $out | awk '{print $1}')"
|
|
test 5 = $lines || expected "Five lines of output"
|
|
grep "is" $out | grep "zijn" >/dev/null || expected "Stemming works"
|
|
grep "een" $out | grep "onbep" >/dev/null || expected "Tagging works"
|
|
|
|
deps="$(echo $(awk 'BEGIN { FS = "\t*" } ; {print $1 " -> " $9 "; "}' <$out))"
|
|
test "1 -> 2; 2 -> 0; 3 -> 4; 4 -> 2; -> ;" = "$deps" || expected "Dependency parsing works"
|
|
''
|