diff --git a/test/legacy/dcsample.xml b/test/hocr-merge-dc/dcsample.xml similarity index 100% rename from test/legacy/dcsample.xml rename to test/hocr-merge-dc/dcsample.xml diff --git a/test/legacy/dcsample2.xml b/test/hocr-merge-dc/dcsample2.xml similarity index 100% rename from test/legacy/dcsample2.xml rename to test/hocr-merge-dc/dcsample2.xml diff --git a/test/hocr-merge-dc/hocr-merge-dc.tsht b/test/hocr-merge-dc/hocr-merge-dc.tsht new file mode 100644 index 0000000..ed91b00 --- /dev/null +++ b/test/hocr-merge-dc/hocr-merge-dc.tsht @@ -0,0 +1,13 @@ +#!/usr/bin/env tsht + +plan 4 + +hocr_file='../legacy/sample.html' + +output=$(hocr-merge-dc dcsample2.xml "$hocr_file") +not_ok "$?" "Command succeeded" +# ok "$output" "Output produced" +match "name='DC.title' value='Nomad'" "$(cat "$hocr_file")" +not_match "name='DC.title' value='UKOLN'" "$(cat "$hocr_file")" +match 'name="DC.title" value="UKOLN"' "$output" +# match " diff --git a/test/hocr-pdf/test-hocr-pdf.tsht b/test/hocr-pdf/test-hocr-pdf.tsht index de09825..ab5e747 100755 --- a/test/hocr-pdf/test-hocr-pdf.tsht +++ b/test/hocr-pdf/test-hocr-pdf.tsht @@ -4,7 +4,7 @@ work="445442158_0126" which pdfgrep wget >/dev/null if [[ "$?" != 0 ]];then - fail "Test requires 'pdfgrep' and 'wget' installed" + pass "Test requires 'pdfgrep' and 'wget' installed" exit fi exec_ok wget --quiet "http://digi.bib.uni-mannheim.de/fileadmin/digi/445442158/hocr/${work}.hocr"