The font tests
Find a file
Akira TAGOH d363ff59ba Fix a typo
2024-06-21 17:04:25 +09:00
.fmf Initial commit 2024-06-19 17:28:47 +09:00
tests default_fonts: Add new test case 2024-06-21 17:00:34 +09:00
README.rst Fix a typo 2024-06-21 17:04:25 +09:00

Fonts Tests
===========

Common test repository for Fedora fonts packages.
Use `tmt` to run tests easily:

        tmt run

How to create
-------------

1. `tmt init` at a package repository
2. `tmt plan create -t mini /plans/<sub package name>`
3. Replace `plans/<sub package name>.fmf` with the following template

Template
--------

::

  summary: Fonts related tests
  discover:
    how: fmf
    url: https://src.fedoraproject.org/tests/fonts
  prepare:
    name: tmt
    how: install
    package: <target font package name to test>
  execute:
    how: tmt
  environment:
    PACKAGE: <package name to test>
    FONT_ALIAS: <generic alias to test such as sans-serif, serif, monospace>
    FONT_FAMILY: <family name for this font>
    FONT_LANG: <comma-separated list of language identifier>
    FONT_WIDTH: <width name to test>

Available test cases
--------------------

- Default fonts

  A test case to check if the targeted font package affects various default
  generic alias selection.
  The following parameters are used in this test:

  - DEFAULT_SANS (optional)

    default value is 0. set 1 if the targeted font package is supposed to
    be a default font for sans-serif on a certain language.

  - DEFAULT_SERIF (optional)

    default value is 0. set 1 if the targeted font package is supposed to
    be a default font for serif on a certain language.

  - DEFAULT_MONO (optional)

    default value is 0. set 1 if the targeted font package is supposed to
    be a default font for monospace on a certain language.

  - DEFAULT_EMOJI (optional)

    default value is 0. set 1 if the targeted font package is supposed to
    be a default font for emoji.

  - DEFAULT_MATH (optional)

    default value is 0. set 1 if the targeted font package is supposed to
    be a default font for math.

  - FONT_FAMILY
  - FONT_LANG (optional)

    default value is en. en will be used for und-zsye (emoji) and und-zmth (math).

- Generic alias

  A test case to check if the expected generic alias is properly assigned.
  The following parameters are used in this test:

  - PACKAGE
  - FONT_ALIAS (optional)

    default value is sans-serif

  - FONT_FAMILY
  - FONT_LANG (optional)

    default value is en.

  - FONT_WIDTH (optional)

    default value is normal.

- Language coverage

  A test case to check if a font in PACKAGE has sufficient coverage for FONT_LANG.
  The following parameters are used in this test:

  - PACKAGE
  - FONT_LANG (optional)

FAQ
---

- My package doesn't have an own config.

  You can replace `discover` section to:

::

   discover:
     how: fmf
     url: https://src.fedoraproject.org/tests/fonts
     exclude:
       - generic_alias