Skip to content

Commit

Permalink
also test nanoemoji --output_file containing spaces
Browse files Browse the repository at this point in the history
the Config.output_file is used to define the filenames of temporary build files which are passed to ninja rule commands as variables, this makes sure things work even when output_file contains spaces
  • Loading branch information
anthrotype committed Nov 18, 2022
1 parent a024899 commit 605f125
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/nanoemoji_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,3 +415,19 @@ def test_glyph_with_zero_advance_width(color_format, tmp_path):
assert list(cbdt.strikeData[0].keys()) == [gname]

assert font["hmtx"][gname] == (0, 0)


@pytest.mark.parametrize("font_type", ["static", "vf"])
def test_build_output_file_with_spaces(font_type):
tmp_dir = run_nanoemoji(
(
locate_test_file(f"minimal_{font_type}/config.toml"),
"--output_file",
"Font With Spaces.ttf",
)
)

output_file = tmp_dir / "Font With Spaces.ttf"
assert output_file.is_file()

assert "COLR" in TTFont(output_file)

0 comments on commit 605f125

Please sign in to comment.