Skip to content

Commit

Permalink
add failing test to reproduce #346
Browse files Browse the repository at this point in the history
  • Loading branch information
anthrotype committed Oct 7, 2021
1 parent ea32a04 commit 3e0ff4c
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/nanoemoji_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,21 @@ def test_build_untouchedsvg_font():
"rect",
"ellipse",
), svg_content


def test_the_curious_case_of_the_parentless_reused_el():
# https://github.com/googlefonts/nanoemoji/issues/346
tmp_dir = _run(
(
"--color_format=picosvg",
"--pretty_print",
"--keep_glyph_names",
*(
locate_test_file(f"parentless_reused_el/emoji_u{codepoints}.svg")
for codepoints in ("0023_20e3", "1f170", "1f171")
),
)
)

font = TTFont(tmp_dir / "Font.ttf")
assert "SVG " in font
3 changes: 3 additions & 0 deletions tests/parentless_reused_el/emoji_u0023_20e3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions tests/parentless_reused_el/emoji_u1f170.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions tests/parentless_reused_el/emoji_u1f171.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3e0ff4c

Please sign in to comment.