Skip to content

Commit 57353df

Browse files
committed
Validate that the alpha in hex colors produces opacity parameter
1 parent ccd6639 commit 57353df

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

tests/fixtures/A.svg

Lines changed: 2 additions & 2 deletions
Loading

tests/fixtures/Y.svg

Lines changed: 2 additions & 2 deletions
Loading

tests/fixtures/Z.svg

Lines changed: 2 additions & 2 deletions
Loading

tests/fonts2svg_test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_main(shadow_font_path, fill_font_path, dots_font_path, fixtures_dir,
4141
"""
4242
output_folder = str(tmp_path)
4343

44-
main(['-c', '99ccff,ff0066,cc0066',
44+
main(['-c', '99ccff77,ff0066aA,cc0066FF',
4545
shadow_font_path, fill_font_path, dots_font_path,
4646
'-o', output_folder])
4747

@@ -95,7 +95,8 @@ def test_main_svgs_folder(fixtures_dir, tmp_path):
9595
assert os.path.isdir(svgs_dir)
9696
assert os.path.exists(os.path.join(temp_dir, SVG_FOLDER_NAME, 'a.svg'))
9797

98-
# test that overlapping contour points are skipped when glphy to SVG path
98+
# test that overlapping contour points are skipped when the glyph is
99+
# written to SVG path
99100
svg_file_name = 'b.svg'
100101
test_svg_path = os.path.join(temp_dir, SVG_FOLDER_NAME, svg_file_name)
101102
assert os.path.exists(test_svg_path)
@@ -162,7 +163,7 @@ def test_main_x_opt_and_extra_colors(shadow_font_path, capsys, tmp_path):
162163
output_folder = str(tmp_path)
163164

164165
main([shadow_font_path, shadow_font_path,
165-
'-x', 'A', '-c', '99ccffFF,ff006677,cc0066',
166+
'-x', 'A', '-c', '99ccff,ff0066,cc0066',
166167
'-o', output_folder])
167168

168169
assert not os.path.exists(os.path.join(output_folder, 'A.svg'))

0 commit comments

Comments
 (0)