Skip to content

Commit

Permalink
Font test
Browse files Browse the repository at this point in the history
  • Loading branch information
daizutabi committed Apr 20, 2024
1 parent 320f8fe commit 6b3c22f
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/test_main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import subprocess
import sys
from pathlib import Path

Expand Down Expand Up @@ -147,3 +148,28 @@ def test_quiet(quiet):
path = Path("Title.pdf")
assert path.exists()
path.unlink()


def test_command():
args = [
"panpdf",
"examples/src",
"-n",
"notebooks",
"-d",
"examples/defaults.yaml",
"-C",
"-o",
"a.pdf",
]
subprocess.run(args, check=False)
assert Path("a.pdf").exists()

p = subprocess.run(["pdffonts", "a.pdf"], check=False, capture_output=True)
stdout = p.stdout.decode("utf-8")

fonts = ["Pagella", "HaranoAji", "Heros", "DejaVuSansMono", "LMRoman"]
for font in fonts:
assert font in stdout

Path("a.pdf").unlink()

0 comments on commit 6b3c22f

Please sign in to comment.