nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at netboot-syslinux-multiplatform 25 lines 662 B view raw
1{ runCommand 2, languageMachines 3}: 4 5runCommand "frog-test" {} '' 6 ${languageMachines.frog}/bin/frog >$out <<EOF 7 Dit is een test 8 9 EOF 10 echo "Frog output:" 11 cat $out 12 13 expected () { 14 echo "Test expectation failed: $@" 15 exit 1 16 } 17 18 lines="$(wc -l $out | awk '{print $1}')" 19 test 5 = $lines || expected "Five lines of output" 20 grep "is" $out | grep "zijn" >/dev/null || expected "Stemming works" 21 grep "een" $out | grep "onbep" >/dev/null || expected "Tagging works" 22 23 deps="$(echo $(awk 'BEGIN { FS = "\t*" } ; {print $1 " -> " $9 "; "}' <$out))" 24 test "1 -> 2; 2 -> 0; 3 -> 4; 4 -> 2; -> ;" = "$deps" || expected "Dependency parsing works" 25''