depot/third_party/nixpkgs/pkgs/development/python-modules/fontbakery/tests.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

22 lines
598 B
Nix

{ runCommand
, fontbakery
}:
let
inherit (fontbakery) pname version src;
in
runCommand "${pname}-tests" { meta.timeout = 5; } ''
# Check the version matches what we packaged.
${fontbakery}/bin/fontbakery --version | grep -q "${version}"
# Can it list its own subcommands?
${fontbakery}/bin/fontbakery --list-subcommands >>$out
# Unpack src to get some test fonts.
tar -xzf ${src} --strip-components=1 ${pname}-${version}/data/test
# Run some font checks.
${fontbakery}/bin/fontbakery check-ufo-sources --no-progress --no-colors data/test/test.ufo >>$out
# TODO add more
''