Skip to content

Commit

Permalink
PPF-415: add last test case, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
chinapandaman committed Dec 19, 2023
1 parent 745af67 commit 5399c9f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion PyPDFForm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

PyPDFForm = Wrapper

__version__ = "1.3.3"
__version__ = "1.3.4"
Binary file not shown.
16 changes: 16 additions & 0 deletions tests/scenario/test_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,19 @@ def test_pdf_form_with_paragraph_fields_new_line_symbol_text_overflow(issue_pdf_
expected = f.read()
assert len(obj.read()) == len(expected)
assert obj.read() == expected


def test_pdf_form_with_paragraph_fields_new_line_symbol_short_text(issue_pdf_directory, request):
obj = PyPDFForm(os.path.join(issue_pdf_directory, "PPF-415.pdf")).fill(
{
"Address": "J Smith\n132 A St\nNYC, NY 12401"
}
)

expected_path = os.path.join(issue_pdf_directory, "PPF-415-3-expected.pdf")
request.config.results["expected_path"] = expected_path
request.config.results["stream"] = obj.read()
with open(expected_path, "rb+") as f:
expected = f.read()
assert len(obj.read()) == len(expected)
assert obj.read() == expected

0 comments on commit 5399c9f

Please sign in to comment.