Skip to content

Commit

Permalink
Merge pull request #910 from openpreserve/karenhanson-fix-xml-indent
Browse files Browse the repository at this point in the history
FIX: Tests affected by indent change
  • Loading branch information
carlwilson authored Mar 5, 2024
2 parents e6bef0d + 2d8331e commit 7f6bd52
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 5 deletions.
27 changes: 27 additions & 0 deletions jhove-bbt/scripts/create-1.29-target.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,30 @@ fi
if [[ -f "${candidateRoot}/regression/modules/PNG-gdm/issue_148.png.jhove.xml" ]]; then
cp "${candidateRoot}/regression/modules/PNG-gdm/issue_148.png.jhove.xml" "${targetRoot}/regression/modules/PNG-gdm/issue_148.png.jhove.xml"
fi

declare -a indent_affected=("errors/modules/PDF-hul/pdf-hul-14-govdocs-489354.pdf.jhove.xml"
"errors/modules/PDF-hul/pdf-hul-9-govdocs-065694.pdf.jhove.xml"
"errors/modules/PDF-hul/pdf-hul-1-govdocs-519846.pdf.jhove.xml"
"errors/modules/PDF-hul/pdf-hul-49-32932439X.pdf.jhove.xml"
"errors/modules/JPEG2000-hul/is_jpx.jp2.jhove.xml"
"errors/modules/WAVE-hul/wf-pcm-44khz-8bit-mono-fmt-chunk-2-unrecognized-bytes.wav.jhove.xml"
"regression/modules/PNG-gdm/issue_694.png.jhove.xml"
"regression/modules/PDF-hul/null-string.pdf.jhove.xml"
"regression/modules/PDF-hul/pdf-hul-94-false-positive.pdf.jhove.xml"
"regression/modules/PDF-hul/issue_646.pdf.jhove.xml"
"regression/modules/PDF-hul/null-string-sig-2.pdf.jhove.xml"
"regression/modules/PDF-hul/null-string-sig-1.pdf.jhove.xml"
"regression/modules/PDF-hul/pdf-hul-40-govdocs-088919.pdf.jhove.xml"
"examples/modules/TIFF-hul/cramps.tif.jhove.xml"
"examples/modules/TIFF-hul/text.tif.jhove.xml"
"examples/modules/TIFF-hul/testpage-small.tif.jhove.xml"
"examples/modules/JPEG2000-hul/ROITest.jpx.jhove.xml"
"examples/modules/WAVE-hul/8-Bit-Noise-1.wav.jhove.xml"
"examples/modules/WAVE-hul/8-Bit-Noise-2.wav.jhove.xml"
)
for filename in "${indent_affected[@]}"
do
if [[ -f "${candidateRoot}/${filename}" ]]; then
cp "${candidateRoot}/${filename}" "${targetRoot}/${filename}"
fi
done
Original file line number Diff line number Diff line change
Expand Up @@ -744,18 +744,18 @@ protected String valueToString(Object obj) {
}

protected void showProperty(Property property) {
String margin = getIndent(++_level);
String margn2 = margin + " ";
String margn3 = margn2 + " ";
String margn4 = margn3 + " ";

PropertyArity arity = property.getArity();
PropertyType type = property.getType();

// If the property would generate an empty element, don't output it,
// as this could result in a schema violation.
if (Utils.isPropertyEmpty(property, arity))
return;

String margin = getIndent(++_level);
String margn2 = margin + " ";
String margn3 = margn2 + " ";
String margn4 = margn3 + " ";

boolean valueIsProperty = PropertyType.PROPERTY.equals(type);
boolean valueIsNiso = PropertyType.NISOIMAGEMETADATA.equals(type);
Expand Down

0 comments on commit 7f6bd52

Please sign in to comment.