Skip to content

Commit

Permalink
test-cli: add case for without_image
Browse files Browse the repository at this point in the history
  • Loading branch information
bertsky committed Feb 3, 2025
1 parent 5ef02c1 commit 68a7da0
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,16 @@ test-api:

test-cli: OUT != mktemp -u
test-cli: UNDATED := xmlstarlet ed -N pc=http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15 -d /pc:PcGts/pc:Metadata/* -d "/pc:PcGts/pc:Page/@imageFilename"
test-cli:
cd tests/workspace; textract2page -O $(OUT) textract_responses/18xx-Missio-EMU-0042.json images/18xx-Missio-EMU-0042.jpg
test-cli: test-cli-with-image test-cli-without-image
if command -v xmlstarlet &> /dev/null; then diff -u <($(UNDATED) tests/workspace/reference_page_xml/18xx-Missio-EMU-0042.xml) <($(UNDATED) $(OUT)); fi
-$(RM) $(OUT)
@-$(RM) $(OUT)

test-cli-with-image:
cd tests/workspace; textract2page -O $(OUT) textract_responses/18xx-Missio-EMU-0042.json images/18xx-Missio-EMU-0042.jpg

test-cli-without-image: OPTS != identify -format "--image-width %w --image-height %h" tests/workspace/images/18xx-Missio-EMU-0042.jpg
test-cli-without-image:
cd tests/workspace; textract2page -O $(OUT) $(OPTS) textract_responses/18xx-Missio-EMU-0042.json images/18xx-Missio-EMU-0042.jpg

build:
$(PYTHON) -m pip build
Expand Down

0 comments on commit 68a7da0

Please sign in to comment.